Settings API: Fix erroring if plugin settings don't exist

This commit is contained in:
Nuckyz 2025-01-28 01:13:36 -03:00
parent f43baddc55
commit cdc756193e
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9

View file

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