diff options
Diffstat (limited to 'src/settings/storage.ts')
-rw-r--r-- | src/settings/storage.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/settings/storage.ts b/src/settings/storage.ts index c0005b7..32b6351 100644 --- a/src/settings/storage.ts +++ b/src/settings/storage.ts @@ -5,7 +5,12 @@ export const load = async(): Promise<SettingData> => { if (!settings) { return DefaultSettingData; } - return SettingData.valueOf(settings as any); + try { + return SettingData.valueOf(settings as any); + } catch (e) { + console.error('unable to load settings', e); + return DefaultSettingData; + } }; export const save = (data: SettingData) => { |