Skip to content

Commit

Permalink
Don't update value if tearing component down
Browse files Browse the repository at this point in the history
Related to #94
  • Loading branch information
Robdel12 committed Feb 28, 2016
1 parent 32bbabe commit 41c2a19
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion addon/components/x-select.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,10 @@ export default Ember.Component.extend({
*/
unregisterOption: function(option) {
this.get('options').removeObject(option);
this._updateValueSingle();

// We don't want to update the value if we're tearing the component down.
if (!this.get('isDestroying')) {
this._updateValueSingle();
}
}
});

0 comments on commit 41c2a19

Please sign in to comment.