diff --git a/app/assets/javascripts/admin/controllers/admin-customize-colors-show.js.es6 b/app/assets/javascripts/admin/controllers/admin-customize-colors-show.js.es6 index ad276be33a9..e333d2a58de 100644 --- a/app/assets/javascripts/admin/controllers/admin-customize-colors-show.js.es6 +++ b/app/assets/javascripts/admin/controllers/admin-customize-colors-show.js.es6 @@ -60,10 +60,11 @@ export default Ember.Controller.extend({ destroy: function() { + const model = this.get('model'); return bootbox.confirm(I18n.t("admin.customize.colors.delete_confirm"), I18n.t("no_value"), I18n.t("yes_value"), result => { if (result) { - this.get('model').destroy().then(()=>{ - this.get('allColors').removeObject(this.get('model')); + model.destroy().then(()=>{ + this.get('allColors').removeObject(model); this.replaceRoute('adminCustomize.colors'); }); }