web/lib/settings: use default settings as base when loading from storage

This commit is contained in:
wukko 2024-07-10 23:29:47 +06:00
parent bc63b0c6b7
commit 2b907e5684
No known key found for this signature in database
GPG key ID: 3E30B3F26C7B4AA2

View file

@ -21,7 +21,10 @@ const loadFromStorage = () => {
return defaultSettings; return defaultSettings;
} }
return JSON.parse(settings) as CobaltSettings; return {
...defaultSettings,
...JSON.parse(settings) as CobaltSettings
}
} }
let update: (_: Updater<CobaltSettings>) => void; let update: (_: Updater<CobaltSettings>) => void;