Skip to content

Commit

Permalink
update SW to work immedetly after register (playground)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Mar 27, 2024
1 parent 82f9f82 commit 4523005
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/sw.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,7 @@ function error404(path) {
}
});
}

self.addEventListener('activate', (event) => {
event.waitUntil(clients.claim());
});

0 comments on commit 4523005

Please sign in to comment.