mirror of
https://github.com/kiwix/kiwix-js-pwa.git
synced 2025-09-18 16:58:26 -04:00
Check that SW is actually registered before using for first time
This commit is contained in:
parent
d53d3aa433
commit
e22ac9d920
@ -4991,7 +4991,7 @@ define(['jquery', 'zimArchiveLoader', 'uiUtil', 'util', 'utf8', 'cache', 'images
|
||||
return encodeURIComponent(m);
|
||||
});
|
||||
|
||||
if (params.contentInjectionMode === 'serviceworker') {
|
||||
if (params.contentInjectionMode === 'serviceworker' && navigator.serviceWorker.controller) {
|
||||
// Remove page max width restriction if required
|
||||
if (params.removePageMaxWidth) htmlArticle = removePageMaxWidth(htmlArticle);
|
||||
// For UWP apps, we need to add the Zoom level to the HTML if we are opening in external window
|
||||
|
Loading…
x
Reference in New Issue
Block a user