Better handling of removing service-worker

This commit is contained in:
Kasper Rynning-Tønnesen
2017-05-31 15:45:36 +02:00
parent 19c0c45433
commit 6cf5577907
3 changed files with 5 additions and 3 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -108,7 +108,9 @@ try{/*
}*/
navigator.serviceWorker.getRegistration('/').then(function(registration) {
registration.unregister();
if(registration) {
registration.unregister();
}
});
} catch(e) {}