From cdc756193e93914d3f644f52ecc4d65dbd02d5a9 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Tue, 28 Jan 2025 01:13:36 -0300 Subject: [PATCH] Settings API: Fix erroring if plugin settings don't exist --- src/api/Settings.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/Settings.ts b/src/api/Settings.ts index 8c05d9bb3..262722b14 100644 --- a/src/api/Settings.ts +++ b/src/api/Settings.ts @@ -224,8 +224,8 @@ export function migratePluginSetting(pluginName: string, oldSetting: string, new const { plugins } = SettingsStore.plain; if ( - plugins[pluginName][newSetting] != null || - plugins[pluginName][oldSetting] == null + plugins?.[pluginName]?.[oldSetting] == null || + plugins[pluginName][newSetting] != null ) return; plugins[pluginName][newSetting] = plugins[pluginName][oldSetting];