web/settings: write to storage if migrated

This commit is contained in:
jj 2024-10-30 12:18:18 +00:00
parent 30b7003871
commit 0a471943ca
No known key found for this signature in database

View file

@ -77,7 +77,7 @@ const loadFromStorage = () => {
export const loadFromString = (settings: string): PartialSettings => {
const parsed = JSON.parse(settings) as AllPartialSettingsWithSchema;
if (parsed.schemaVersion < defaultSettings.schemaVersion) {
return migrate(parsed);
return writeToStorage(migrate(parsed));
}
return parsed as PartialSettings;