mirror of
https://github.com/smartyellow/status.git
synced 2025-01-18 13:37:59 +00:00
Local storage fallback
This commit is contained in:
parent
ba0687af94
commit
0c88920f9e
@ -19,7 +19,17 @@ function createSettingsStore() {
|
|||||||
s.set(val);
|
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 {
|
return {
|
||||||
subscribe: s.subscribe,
|
subscribe: s.subscribe,
|
||||||
|
@ -40,7 +40,7 @@ async function build() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const { output } = await bundle.generate({
|
const { output } = await bundle.generate({
|
||||||
sourcemap: false,
|
sourcemap: true,
|
||||||
format: 'iife',
|
format: 'iife',
|
||||||
name: 'app',
|
name: 'app',
|
||||||
file: 'public/build/bundle.js',
|
file: 'public/build/bundle.js',
|
||||||
|
Loading…
Reference in New Issue
Block a user