forked from MapComplete/MapComplete
Fix service worker
This commit is contained in:
parent
ed6f0cf84b
commit
ea1e7e62ef
8 changed files with 149 additions and 102 deletions
|
@ -82,13 +82,12 @@
|
|||
<script>
|
||||
window.addEventListener('load', () => {
|
||||
if ('serviceWorker' in navigator) {
|
||||
// register service worker
|
||||
navigator.serviceWorker.register('/service-worker.js').then(
|
||||
() => {
|
||||
console.log('SW registration successful');
|
||||
console.log('Service worker registration successful');
|
||||
},
|
||||
err => {
|
||||
console.error('SW registration failed', err)
|
||||
console.error('Service worker registration failed', err)
|
||||
});
|
||||
} else {
|
||||
console.log("Service workers are not supported")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue