diff --git a/app/assets/javascripts/admin/components/site-setting.js.es6 b/app/assets/javascripts/admin/components/site-setting.js.es6 index 4c1d76cad80..e94713f476b 100644 --- a/app/assets/javascripts/admin/components/site-setting.js.es6 +++ b/app/assets/javascripts/admin/components/site-setting.js.es6 @@ -5,14 +5,6 @@ import showModal from "discourse/lib/show-modal"; import AboutRoute from "discourse/routes/about"; export default Ember.Component.extend(BufferedContent, SettingComponent, { - update(key, value, updateExistingUsers = false) { - if (updateExistingUsers) { - return SiteSetting.update(key, value, { updateExistingUsers: true }); - } else { - return SiteSetting.update(key, value); - } - }, - _save(callback) { const defaultCategoriesSettings = [ "default_categories_watching", @@ -36,19 +28,16 @@ export default Ember.Component.extend(BufferedContent, SettingComponent, { admin: true }); - controller.setProperties({ - onClose: () => { - const updateExistingUsers = controller.get("updateExistingUsers"); - if (updateExistingUsers === true) { - callback(this.update(key, value, true)); - } else if (updateExistingUsers === false) { - callback(this.update(key, value)); - } - } + controller.set("onClose", () => { + callback( + SiteSetting.update(key, value, { + updateExistingUsers: controller.updateExistingUsers + }) + ); }); }); } else { - callback(this.update(key, value)); + callback(SiteSetting.update(key, value)); } } }); diff --git a/app/assets/javascripts/admin/mixins/setting-component.js.es6 b/app/assets/javascripts/admin/mixins/setting-component.js.es6 index a2d5b3a4de7..397817d7934 100644 --- a/app/assets/javascripts/admin/mixins/setting-component.js.es6 +++ b/app/assets/javascripts/admin/mixins/setting-component.js.es6 @@ -116,7 +116,7 @@ export default Ember.Mixin.create({ .then(() => { this.set("validationMessage", null); this.commitBuffer(); - if (AUTO_REFRESH_ON_SAVE.includes(this.get("setting.setting"))) { + if (AUTO_REFRESH_ON_SAVE.includes(this.setting.setting)) { this.afterSave(); } }) diff --git a/app/assets/javascripts/admin/templates/modal/site-setting-default-categories.hbs b/app/assets/javascripts/admin/templates/modal/site-setting-default-categories.hbs index e56bf01c654..0bd05c2ba8c 100644 --- a/app/assets/javascripts/admin/templates/modal/site-setting-default-categories.hbs +++ b/app/assets/javascripts/admin/templates/modal/site-setting-default-categories.hbs @@ -3,6 +3,6 @@ {{/d-modal-body}}