fix(frontend): keyval-storeの値が削除できずに処理が止まる問題を修正 (#15803)

* fix(frontend): keyval-storeの値が削除できずに処理が止まる問題を修正

* Update Changelog

* implement abortcontroller

* fix lint
This commit is contained in:
かっこかり 2025-04-13 15:48:43 +09:00 committed by GitHub
parent 81bf139e3e
commit dd5dd6184a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 30 additions and 5 deletions

View file

@ -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();
}