From 306bae39c6c2f79614634feff64e934883da36c9 Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Mon, 4 Oct 2021 11:48:58 +0100 Subject: [PATCH] Fixed error when removing existing settings that no longer exist no issue - debug statement was using wrong setting variable, `themeSetting` won't exist when it's been 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 a75f598ba7..0827e0e42f 100644 --- a/ghost/custom-theme-settings-service/lib/service.js +++ b/ghost/custom-theme-settings-service/lib/service.js @@ -131,7 +131,7 @@ module.exports = class CustomThemeSettingsService { const hasChangedType = themeSetting && themeSetting.type !== knownSetting.type; if (hasBeenRemoved || hasChangedType) { - debug(`Removing custom theme setting '${theme.name}.${themeSetting.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}); removedIds.push(knownSetting.id); return;