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);
export const SettingsStore = new SettingsStoreClass(settings, {
readOnly: true,
getDefaultValue({

View file

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