mirror of
https://github.com/Equicord/Equicord.git
synced 2025-02-18 22:28:51 -05:00
Actually use newSettings
This commit is contained in:
parent
a52ca1f85e
commit
8ce8d10fb4
1 changed files with 3 additions and 3 deletions
|
@ -251,11 +251,11 @@ export function migrateSettingFromPlugin(newPlugin: string, newSetting: string,
|
||||||
const newSettings = SettingsStore.plain.plugins[newPlugin];
|
const newSettings = SettingsStore.plain.plugins[newPlugin];
|
||||||
const oldSettings = SettingsStore.plain.plugins[oldPlugin];
|
const oldSettings = SettingsStore.plain.plugins[oldPlugin];
|
||||||
if (!oldSettings || !Object.hasOwn(oldSettings, oldSetting)) return;
|
if (!oldSettings || !Object.hasOwn(oldSettings, oldSetting)) return;
|
||||||
if (!newSettings || (Object.hasOwn(SettingsStore.plain.plugins[newPlugin], newSetting))) return;
|
if (!newSettings || (Object.hasOwn(newSettings, newSetting))) return;
|
||||||
|
|
||||||
if (Object.hasOwn(SettingsStore.plain.plugins[newPlugin], newSetting)) return;
|
if (Object.hasOwn(newSettings, newSetting)) return;
|
||||||
|
|
||||||
SettingsStore.plain.plugins[newPlugin][newSetting] = oldSettings[oldSetting];
|
newSettings[newSetting] = oldSettings[oldSetting];
|
||||||
delete oldSettings[oldSetting];
|
delete oldSettings[oldSetting];
|
||||||
SettingsStore.markAsChanged();
|
SettingsStore.markAsChanged();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue