aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/settings/storage.ts7
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) => {