Skip to content

Commit 982f66f

Browse files
authored
update
Signed-off-by: GitHub <[email protected]>
1 parent 450c911 commit 982f66f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/utils/index.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ const themeSetup = () => {
2323
}
2424
}
2525

26-
const clearCache = () => {
26+
const clearCache = async () => {
2727
// clear local storage all data.
28-
localStorage.clear();
28+
await localStorage.clear();
2929

3030
// clear all cache data.
31-
caches.keys().then((keyList: any) =>
31+
await caches.keys().then((keyList: any) =>
3232
Promise.all(
3333
keyList.map((key: any) => {
3434
return caches.delete(key);
@@ -49,4 +49,5 @@ export {
4949
themeSetup,
5050
urls,
5151
recaptchaToken,
52+
clearCache,
5253
}

0 commit comments

Comments
 (0)