Skip to content

Commit

Permalink
register service worker correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
koddsson committed Nov 9, 2023
1 parent 7f3792d commit 8cda9f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/register-service-worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ if ('serviceWorker' in navigator) {
// Register a service worker hosted at the root of the
// site using the default scope.
try {
const registration = await navigator.serviceWorker.register('/service-worker.js')
const registration = await navigator.serviceWorker.register('./service-worker.js')
console.log('Service worker registration succeeded:', registration)
} catch (error) {
console.error(`Service worker registration failed: ${error}`)
Expand Down

0 comments on commit 8cda9f5

Please sign in to comment.