chore: fix sw.js error (#7667)

This commit is contained in:
iamkun
2022-05-12 23:48:16 +08:00
committed by GitHub
parent 591a7c32f3
commit ae25f4e14a
3 changed files with 26 additions and 1 deletions

12
docs/public/sw.js Normal file
View File

@ -0,0 +1,12 @@
self.addEventListener('activate', (e) => {
e.waitUntil(
caches.keys().then((t) => {
return Promise.all(
t.map((n) => {
return caches.delete(n)
})
)
})
)
})
self.skipWaiting()