Skip to content

Commit

Permalink
simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
camillobruni committed Apr 8, 2024
1 parent a7b6eb8 commit 00febf4
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/_js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,8 @@
}

// Remove any existing service worker
navigator.serviceWorker.getRegistrations().then((registrations) => {
for(let registration of registrations) {
registration.unregister();
}
});
navigator.serviceWorker.getRegistrations().then(
registrations => registrations.forEach(each => each.unregister()));

// Remove UTM garbage from URLs, to make it less likely such links get shared.
if (location.search.indexOf('utm_source') > -1) {
Expand Down

0 comments on commit 00febf4

Please sign in to comment.