Skip to content

Commit

Permalink
ServiceWorker: fix scope
Browse files Browse the repository at this point in the history
to hopefully prevent multiple SWs from being registered
  • Loading branch information
dwaring87 committed Mar 9, 2022
1 parent 3a1086d commit 2351f6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
if ('serviceWorker' in navigator) {
window.addEventListener('load', () => {
navigator.serviceWorker.register('/sw.js', {
scope: '.'
scope: '/'
}).then(registration => {
console.log('SW registered: ', registration);
}).catch(registrationError => {
Expand Down

0 comments on commit 2351f6c

Please sign in to comment.