Prevent app getting into an anomalous state with SW launch

Former-commit-id: 7b4af9e977b8aa2a96fae5b3fa6e41e1179e6419 [formerly 7299f02a1da852fecb8a18195840ffeb233cb95a [formerly 7a6f70162b1c7b283f2fa4865f3c613ca7128a38]]
Former-commit-id: 0b557c354fe740746d3c36cd856544081427bed6 [formerly e08d3e90392b2a288d8ff5486faded5937d68f27]
Former-commit-id: 8ad10f51b75aa54105503d6040b629a5c9ba9bc8
This commit is contained in:
Jaifroid 2022-06-13 16:53:25 +01:00
parent c931ae6d5a
commit 928fa3b342

View File

@ -181,8 +181,9 @@ if (!/^http/i.test(window.location.protocol) && params.localUWPSettings &&
window.location.href = params.PWAServer + 'www/index.html' + uriParams;
// This will trigger the error catching above, cleanly dematerialize this script and transport us swiftly to PWA land
throw 'Beam me up, Scotty!';
} else if (params.localUWPSettings.PWA_launch === 'fail') {
console.error('PWA failed to launch correctly last time! Setting failsafe to avoid boot-loop...');
} else {
console.error('PWA may have failed to launch correctly last time! Setting failsafe to avoid boot-loop...');
params.localUWPSettings.PWA_launch = 'fail';
}
}