Unbind frontend listeners when window closes

This commit is contained in:
lilia 2015-03-14 20:46:00 -07:00
parent 69d5a6a33c
commit 651b6341fa

View file

@ -28,6 +28,9 @@
initialize: function() {
this.listenTo(this.model, 'change', this.render); // auto update
this.listenTo(this.model, 'destroy', this.remove); // auto update
window.addEventListener('beforeunload', function () {
this.stopListening();
}.bind(this));
},
select: function(e) {