From f398a1c871fd57dfbe912f0b0ca4b5ebce6d3dee Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Sat, 3 Aug 2024 21:56:33 -0300 Subject: [PATCH] fix breaking settings :sob: --- src/api/Settings.ts | 1 - src/plugins/consoleShortcuts/index.ts | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/api/Settings.ts b/src/api/Settings.ts index d7c3a2143..6bddaf5b5 100644 --- a/src/api/Settings.ts +++ b/src/api/Settings.ts @@ -118,7 +118,6 @@ const saveSettingsOnFrequentAction = debounce(async () => { } }, 60_000); - export const SettingsStore = new SettingsStoreClass(settings, { readOnly: true, getDefaultValue({ diff --git a/src/plugins/consoleShortcuts/index.ts b/src/plugins/consoleShortcuts/index.ts index 4f58a500e..913d106fa 100644 --- a/src/plugins/consoleShortcuts/index.ts +++ b/src/plugins/consoleShortcuts/index.ts @@ -187,8 +187,9 @@ function loadAndCacheShortcut(key: string, val: any, forceLoad: boolean) { const descriptor = descriptors[propKey]; if (descriptor.writable === true || descriptor.set != null) { - const newValue = unwrapProxy(value[propKey]); - if (newValue != null) { + const currentValue = value[propKey]; + const newValue = unwrapProxy(currentValue); + if (newValue != null && currentValue !== newValue) { value[propKey] = newValue; } }