diff options
Diffstat (limited to 'src/stores')
| -rw-r--r-- | src/stores/anime.ts | 4 | ||||
| -rw-r--r-- | src/stores/lastPruneTimes.ts | 4 | ||||
| -rw-r--r-- | src/stores/manga.ts | 4 | ||||
| -rw-r--r-- | src/stores/userIdentity.ts | 4 |
4 files changed, 4 insertions, 12 deletions
diff --git a/src/stores/anime.ts b/src/stores/anime.ts index f269d8d0..5e4cd251 100644 --- a/src/stores/anime.ts +++ b/src/stores/anime.ts @@ -4,9 +4,7 @@ import { writable } from 'svelte/store'; const anime = writable<string>(browser ? localStorage.getItem('anime') ?? '' : ''); anime.subscribe((value) => { - if (browser) { - localStorage.setItem('anime', value); - } + if (browser) localStorage.setItem('anime', value); }); export default anime; diff --git a/src/stores/lastPruneTimes.ts b/src/stores/lastPruneTimes.ts index ef71053b..aa2ab723 100644 --- a/src/stores/lastPruneTimes.ts +++ b/src/stores/lastPruneTimes.ts @@ -54,9 +54,7 @@ const createStore = () => { const lastPruneTimes = createStore(); lastPruneTimes.subscribe((value) => { - if (browser) { - localStorage.setItem('lastPruneTimes', JSON.stringify(value)); - } + if (browser) localStorage.setItem('lastPruneTimes', JSON.stringify(value)); }); export default lastPruneTimes; diff --git a/src/stores/manga.ts b/src/stores/manga.ts index 74e3f95a..48bb8f9a 100644 --- a/src/stores/manga.ts +++ b/src/stores/manga.ts @@ -4,9 +4,7 @@ import { writable } from 'svelte/store'; const manga = writable<string>(browser ? localStorage.getItem('manga') ?? '' : ''); manga.subscribe((value) => { - if (browser) { - localStorage.setItem('manga', value); - } + if (browser) localStorage.setItem('manga', value); }); export default manga; diff --git a/src/stores/userIdentity.ts b/src/stores/userIdentity.ts index e5018268..4b90358d 100644 --- a/src/stores/userIdentity.ts +++ b/src/stores/userIdentity.ts @@ -4,9 +4,7 @@ import { writable } from 'svelte/store'; const userIdentity = writable<string>(browser ? localStorage.getItem('userIdentity') ?? '' : ''); userIdentity.subscribe((value) => { - if (browser) { - localStorage.setItem('userIdentity', value); - } + if (browser) localStorage.setItem('userIdentity', value); }); export default userIdentity; |