mirror of
https://github.com/kiwix/kiwix-js.git
synced 2025-09-23 04:28:30 -04:00
Automatically fallback to jQuery mode if the SW fails to register.
Fixes #405
This commit is contained in:
parent
971da815b5
commit
922d19aa01
@ -309,6 +309,9 @@ define(['jquery', 'zimArchiveLoader', 'util', 'uiUtil', 'cookies','abstractFiles
|
||||
}, function (err) {
|
||||
console.error('error while registering serviceWorker', err);
|
||||
refreshAPIStatus();
|
||||
alert("The ServiceWorker could not be properly registered. Switching back to jQuery mode. Error message : " + err);
|
||||
setContentInjectionMode("jquery");
|
||||
return;
|
||||
});
|
||||
} else {
|
||||
// We need to set this variable earlier else the ServiceWorker does not get reactivated
|
||||
|
Loading…
x
Reference in New Issue
Block a user