Skip to content
Snippets Groups Projects
Merged Timothee P requested to merge redmine-issues/13600 into develop
1 file
+ 12
8
Compare changes
  • Side-by-side
  • Inline
@@ -26,15 +26,19 @@ if (process.env.NODE_ENV === 'production') {
console.log('New content is downloading.');
},
updated (registration) {
alert('Une nouvelle version de l\'application est disponible, l\'application va se recharger');
console.log('New content is available; please refresh.');
//
if (!registration || !registration.waiting) {
return;
if (!navigator.webdriver) {
alert('Une nouvelle version de l\'application est disponible, l\'application va se recharger');
console.log('New content is available; please refresh.');
//
if (!registration || !registration.waiting) {
return;
}
// Send message to SW to skip the waiting and activate the new SW
registration.waiting.postMessage({ type: 'SKIP_WAITING' });
//window.location.reload(true);
} else {
console.log('Execution dans un navigateur controlé par un agent automatisé, la mise à jour n\'est pas appliqué pendant le test.');
}
// Send message to SW to skip the waiting and activate the new SW
registration.waiting.postMessage({ type: 'SKIP_WAITING' });
//window.location.reload(true);
},
offline () {
console.log('No internet connection found. App is running in offline mode.');
Loading