diff --git a/static/pwa/registrator.js b/static/pwa/registrator.js index 3a0137468..374dc8cc0 100644 --- a/static/pwa/registrator.js +++ b/static/pwa/registrator.js @@ -1,12 +1,10 @@ if ('serviceWorker' in navigator) { - window.addEventListener('load', () => { - navigator.serviceWorker - .register('pwa-worker.js') - .then(reg => { - console.log('Service worker registered.', reg); - }) - .catch(err => { - console.log(err); - }); - }); + navigator.serviceWorker + .register('pwa-worker.js') + .then(reg => { + console.log('Service worker registered.', reg); + }) + .catch(err => { + console.log(err); + }); }