We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 41d4763 commit 2b0c8cdCopy full SHA for 2b0c8cd
1 file changed
src/sw.js
@@ -43,13 +43,11 @@ self.addEventListener("activate", (event) => {
43
const cache = await caches.open(cacheName);
44
// clean up those who are not listed in manifestURLs
45
const keys = await cache.keys();
46
- await Promise.all(
47
- keys.map((request) =>
48
- manifestURLs.includes(request.url)
49
- ? Promise.resolve()
50
- : cache.delete(request),
51
- ),
52
- );
+ for (const request of keys) {
+ if (!manifestURLs.includes(request.url)) {
+ await cache.delete(request);
+ }
53
})(),
54
);
55
});
0 commit comments