2
1
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2023-12-13 21:00:40 +01:00

Fixed unexpected early-exit of settings sync

no issue

- `for .. of` loop contained a `return` rather than a `continue` so the whole function was being exited with an unexpected `undefined` return value after the first loop where an unknown setting is removed
This commit is contained in:
Kevin Ansfield 2021-10-04 11:50:31 +01:00
parent 306bae39c6
commit ef136a2029

View file

@ -134,7 +134,7 @@ module.exports = class CustomThemeSettingsService {
debug(`Removing custom theme setting '${theme.name}.${knownSetting.key}' - ${hasBeenRemoved ? 'not found in theme' : 'type changed'}`); debug(`Removing custom theme setting '${theme.name}.${knownSetting.key}' - ${hasBeenRemoved ? 'not found in theme' : 'type changed'}`);
await this.repository.destroy({id: knownSetting.id}); await this.repository.destroy({id: knownSetting.id});
removedIds.push(knownSetting.id); removedIds.push(knownSetting.id);
return; continue;
} }
// replace value with default if it's not a valid select option // replace value with default if it's not a valid select option