Safeguarding against empty default profile

This commit is contained in:
Magnus Åhall 2026-07-18 09:23:00 +02:00
parent da8256f002
commit af11eb9010
2 changed files with 12 additions and 1 deletions

View file

@ -221,7 +221,7 @@ export class App {
const devPrefSet = localStorage.getItem('device_preference_set') || 'default'
const userData = localStorage.getItem('user') || '{"default": {}}'
const user = JSON.parse(userData)
return new N2PreferenceSet(devPrefSet, user.Preferences[devPrefSet])
return new N2PreferenceSet(devPrefSet, user.Preferences[devPrefSet] || {})
}// }}}
}