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
This commit is contained in:
Kevin Ansfield 2021-10-04 11:48:58 +01:00
parent 5e40a03336
commit 306bae39c6

View File

@ -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;