|
|
@ -5,7 +5,12 @@ export const load = async(): Promise<SettingData> => { |
|
|
|
if (!settings) { |
|
|
|
if (!settings) { |
|
|
|
return DefaultSettingData; |
|
|
|
return DefaultSettingData; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
try { |
|
|
|
return SettingData.valueOf(settings as any); |
|
|
|
return SettingData.valueOf(settings as any); |
|
|
|
|
|
|
|
} catch (e) { |
|
|
|
|
|
|
|
console.error('unable to load settings', e); |
|
|
|
|
|
|
|
return DefaultSettingData; |
|
|
|
|
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
export const save = (data: SettingData) => { |
|
|
|
export const save = (data: SettingData) => { |
|
|
|