From 88df84bf2b71b621b9e7b9a52214cc74b7917587 Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Mon, 28 Oct 2019 10:33:31 +0100 Subject: [PATCH] FIX: theme component setting was not getting updated in the UI (#8247) --- .../components/theme-setting-editor.js.es6 | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/app/assets/javascripts/admin/components/theme-setting-editor.js.es6 b/app/assets/javascripts/admin/components/theme-setting-editor.js.es6 index 292356d55ae..a99b819466a 100644 --- a/app/assets/javascripts/admin/components/theme-setting-editor.js.es6 +++ b/app/assets/javascripts/admin/components/theme-setting-editor.js.es6 @@ -6,13 +6,16 @@ import { popupAjaxError } from "discourse/lib/ajax-error"; export default Component.extend(BufferedContent, SettingComponent, { layoutName: "admin/templates/components/site-setting", - _save() { - return ajax(`/admin/themes/${this.model.id}/setting`, { - type: "PUT", - data: { - name: this.setting.setting, - value: this.get("buffered.value") - } - }).catch(popupAjaxError); + + _save(callback) { + callback( + ajax(`/admin/themes/${this.model.id}/setting`, { + type: "PUT", + data: { + name: this.setting.setting, + value: this.get("buffered.value") + } + }).catch(popupAjaxError) + ); } });