Skip to content

Commit

Permalink
?
Browse files Browse the repository at this point in the history
  • Loading branch information
guyutongxue committed May 5, 2024
1 parent d174046 commit 8e39ce7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions public/sw.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,12 @@ const cacheFirst = async (request) => {
};

self_.addEventListener("activate", (event) => {
event.waitUntil(self_.registration?.navigationPreload.enable());
event.waitUntil(deleteOldCaches());
event.waitUntil(
(async () => {
await self_.registration?.navigationPreload.enable();
await deleteOldCaches();
})()
);
});

self_.addEventListener("install", (event) => {
Expand Down

0 comments on commit 8e39ce7

Please sign in to comment.