fix breaking settings 😭

This commit is contained in:
Nuckyz 2024-08-03 21:56:33 -03:00
parent 9871e16e28
commit f398a1c871
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9
2 changed files with 3 additions and 3 deletions

View file

@ -118,7 +118,6 @@ const saveSettingsOnFrequentAction = debounce(async () => {
} }
}, 60_000); }, 60_000);
export const SettingsStore = new SettingsStoreClass(settings, { export const SettingsStore = new SettingsStoreClass(settings, {
readOnly: true, readOnly: true,
getDefaultValue({ getDefaultValue({

View file

@ -187,8 +187,9 @@ function loadAndCacheShortcut(key: string, val: any, forceLoad: boolean) {
const descriptor = descriptors[propKey]; const descriptor = descriptors[propKey];
if (descriptor.writable === true || descriptor.set != null) { if (descriptor.writable === true || descriptor.set != null) {
const newValue = unwrapProxy(value[propKey]); const currentValue = value[propKey];
if (newValue != null) { const newValue = unwrapProxy(currentValue);
if (newValue != null && currentValue !== newValue) {
value[propKey] = newValue; value[propKey] = newValue;
} }
} }