From ef136a20294b76f9641de932741febdb19c8c139 Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Mon, 4 Oct 2021 11:50:31 +0100 Subject: [PATCH] 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 --- ghost/custom-theme-settings-service/lib/service.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghost/custom-theme-settings-service/lib/service.js b/ghost/custom-theme-settings-service/lib/service.js index 0827e0e42f..0f5fa24bc9 100644 --- a/ghost/custom-theme-settings-service/lib/service.js +++ b/ghost/custom-theme-settings-service/lib/service.js @@ -134,7 +134,7 @@ module.exports = class CustomThemeSettingsService { debug(`Removing custom theme setting '${theme.name}.${knownSetting.key}' - ${hasBeenRemoved ? 'not found in theme' : 'type changed'}`); await this.repository.destroy({id: knownSetting.id}); removedIds.push(knownSetting.id); - return; + continue; } // replace value with default if it's not a valid select option