0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

Fixed unexpected unsaved changes modal when saving custom theme settings

no issue

- `customThemeSettings.settings` was not being updated with the latest models after saving so `customThemeSettings.isDirty` was still reporting `true` even though the save had completed
This commit is contained in:
Kevin Ansfield 2021-09-30 16:29:41 +01:00
parent e8933ff7a8
commit 179855ae38

View file

@ -50,7 +50,9 @@ export default class CustomThemeSettingsServices extends Service {
const listRecord = this.store.createRecord('custom-theme-setting-list', {customThemeSettings: this.settings});
yield listRecord.save();
// don't keep references to individual settings around
this.settings = listRecord.customThemeSettings;
// don't keep references to lists and their children around
this.store.unloadRecord(listRecord);
return this.settings;