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