Skip to content

Commit

Permalink
Deduplicate service worker registration
Browse files Browse the repository at this point in the history
  • Loading branch information
rxu committed May 26, 2024
1 parent 0beae0a commit 12fbb69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion styles/all/template/update_worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

function webpushWorkerUpdate() {
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register(serviceWorkerUrl)
navigator.serviceWorker.getRegistration(serviceWorkerUrl)
.then((registration) => {
registration.update();
})
Expand Down

0 comments on commit 12fbb69

Please sign in to comment.