mirror of
https://github.com/kiwix/kiwix-js-pwa.git
synced 2025-09-08 11:48:26 -04:00
Critical fix for race condition in startup
Former-commit-id: 64e91d572a32e3006fb077cdaa436dad0b5239b2 [formerly 15616d63c6bea4792c59528fc1ec54937791467d [formerly ebe006dae3817fea2f42676f41217cabc318d790]] Former-commit-id: f9e5a834ba11f050a6f9c8245b991eb00866dd9c Former-commit-id: c5f290824b2f0ac3216fb8175393584a934d8145
This commit is contained in:
parent
a33e6adae8
commit
2e706bc5ae
@ -1,5 +1,9 @@
|
||||
# Changelog
|
||||
|
||||
## Release 1.2.2
|
||||
|
||||
* FIX: Race condition in handover to PWA code
|
||||
|
||||
## Release 1.2.1
|
||||
|
||||
* UPDATE: Minor update to improve handover between local and PWA code
|
||||
|
@ -59,7 +59,7 @@
|
||||
window.require = undefined;
|
||||
window.fs = requireNode('fs');
|
||||
}
|
||||
if ('serviceWorker' in navigator && /^http|ms-appx-web/.test(window.location.protocol)) {
|
||||
if ('serviceWorker' in navigator && !/^ms-appx-web/i.test(window.location.protocol)) {
|
||||
console.log('Trying to activate Service Worker...');
|
||||
if (navigator.serviceWorker.controller) {
|
||||
console.log('Service Worker is already active');
|
||||
@ -69,6 +69,8 @@
|
||||
scope: "../"
|
||||
}).then(function (reg) {
|
||||
console.log("Service worker has been registered for scope: " + reg.scope);
|
||||
}).catch(function (err) {
|
||||
console.err('Service worker could not be registered', err);
|
||||
});
|
||||
}
|
||||
} else {
|
||||
@ -113,6 +115,7 @@
|
||||
<div id="update" class="update">
|
||||
<h3 style="margin-top:0;">Changes in version <span class="version">1.0</span></h3>
|
||||
<ul style="padding-left: 15px;">
|
||||
<li>Critical update to prevent race condition in switch to PWA</li>
|
||||
<li>Minor update to improve handover between local and PWA code</li>
|
||||
<li>Further implementation of Service Worker mode in UWP app (PC, not mobile)</li>
|
||||
<li>Fix display of masonry tiles in JQuery mode with latest ZIMs</li>
|
||||
|
Loading…
x
Reference in New Issue
Block a user