diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2023-01-07 10:13:02 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2023-01-07 10:13:02 +0900 |
| commit | 91503405b4e58cb9d39c0441d86ff540a27931e6 (patch) | |
| tree | 4c64371d1a88668e762733db1afaa3be7e284442 /packages/frontend/src/scripts/idb-proxy.ts | |
| parent | 13.0.0-beta.26 (diff) | |
| download | sharkey-91503405b4e58cb9d39c0441d86ff540a27931e6.tar.gz sharkey-91503405b4e58cb9d39c0441d86ff540a27931e6.tar.bz2 sharkey-91503405b4e58cb9d39c0441d86ff540a27931e6.zip | |
refactor(client): typed localStorage
Diffstat (limited to 'packages/frontend/src/scripts/idb-proxy.ts')
| -rw-r--r-- | packages/frontend/src/scripts/idb-proxy.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/frontend/src/scripts/idb-proxy.ts b/packages/frontend/src/scripts/idb-proxy.ts index 77bb84463c..218682bb56 100644 --- a/packages/frontend/src/scripts/idb-proxy.ts +++ b/packages/frontend/src/scripts/idb-proxy.ts @@ -22,15 +22,15 @@ if (idbAvailable) { export async function get(key: string) { if (idbAvailable) return iget(key); - return JSON.parse(localStorage.getItem(fallbackName(key))); + return JSON.parse(window.localStorage.getItem(fallbackName(key))); } export async function set(key: string, val: any) { if (idbAvailable) return iset(key, val); - return localStorage.setItem(fallbackName(key), JSON.stringify(val)); + return window.localStorage.setItem(fallbackName(key), JSON.stringify(val)); } export async function del(key: string) { if (idbAvailable) return idel(key); - return localStorage.removeItem(fallbackName(key)); + return window.localStorage.removeItem(fallbackName(key)); } |