mirror of
https://github.com/smartyellow/status.git
synced 2025-01-18 05:27:58 +00:00
Local storage fallback
This commit is contained in:
parent
ba0687af94
commit
0c88920f9e
@ -19,7 +19,17 @@ function createSettingsStore() {
|
||||
s.set(val);
|
||||
}
|
||||
|
||||
updateStorage(JSON.parse(window.localStorage.getItem('statusdash')));
|
||||
const localStorageString = window.localStorage.getItem('statusdash');
|
||||
let localStorage = {};
|
||||
|
||||
try {
|
||||
localStorage = JSON.parse(localStorageString);
|
||||
}
|
||||
catch {
|
||||
localStorage = {};
|
||||
}
|
||||
|
||||
updateStorage(localStorage);
|
||||
|
||||
return {
|
||||
subscribe: s.subscribe,
|
||||
|
@ -40,7 +40,7 @@ async function build() {
|
||||
});
|
||||
|
||||
const { output } = await bundle.generate({
|
||||
sourcemap: false,
|
||||
sourcemap: true,
|
||||
format: 'iife',
|
||||
name: 'app',
|
||||
file: 'public/build/bundle.js',
|
||||
|
Loading…
Reference in New Issue
Block a user