fix(frontend): keyval-storeの値が削除できずに処理が止まる問題を修正 (#15803)
* fix(frontend): keyval-storeの値が削除できずに処理が止まる問題を修正 * Update Changelog * implement abortcontroller * fix lint
This commit is contained in:
parent
679ab04fb4
commit
25f0810cfa
2 changed files with 29 additions and 4 deletions
|
|
@ -9,6 +9,7 @@ import {
|
|||
get as iget,
|
||||
set as iset,
|
||||
del as idel,
|
||||
clear as iclear,
|
||||
} from 'idb-keyval';
|
||||
import { miLocalStorage } from '@/local-storage.js';
|
||||
|
||||
|
|
@ -51,3 +52,7 @@ export async function del(key: string) {
|
|||
if (idbAvailable) return idel(key);
|
||||
return miLocalStorage.removeItem(`${PREFIX}${key}`);
|
||||
}
|
||||
|
||||
export async function clear() {
|
||||
if (idbAvailable) return iclear();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue