Fixed error with serviceworker giving out error

This commit is contained in:
Kasper Rynning-Tønnesen
2016-05-27 17:30:44 +02:00
parent 852bbb000e
commit e6c4f14447
3 changed files with 10 additions and 10 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

@@ -60,13 +60,13 @@ var connection_options = {
var fromFront = false;
var fromChannel = false;
try {
if ('serviceWorker' in navigator) {
if ('serviceWorker' in navigator) {
navigator.serviceWorker.getRegistration().then(function(r) {
try {
r.unregister();
} catch(e) {}
});
};
} catch(e){}
};
$().ready(function(){
if(!fromFront && window.location.pathname != "/") init();