Cancelling adding an indexer will stop listening to save event

Fixed: Cancelling adding indexer will not break saving
This commit is contained in:
Mark McDowall
2014-01-29 21:52:50 -08:00
parent 1cae7293e7
commit cc66077943
3 changed files with 16 additions and 4 deletions
+5 -1
View File
@@ -10,6 +10,7 @@ define(
initialize: function () {
this.listenTo(vent, vent.Commands.SaveSettings, this.saveSettings);
this.listenTo(this, 'destroy', this._stopListening);
},
saveSettings: function () {
@@ -28,8 +29,11 @@ define(
}
return undefined;
}
},
_stopListening: function () {
this.stopListening(vent, vent.Commands.SaveSettings);
}
});
return AsChangeTrackingModel.call(model);