mirror of
https://gitlab.com/timvisee/send.git
synced 2024-11-10 05:02:45 +01:00
disable streaming download if registering sw fails. fixes #1226
This commit is contained in:
parent
9da70931e4
commit
f78e025d33
@ -35,8 +35,13 @@ if (process.env.NODE_ENV === 'production') {
|
||||
return window.location.assign('/unsupported/crypto');
|
||||
}
|
||||
if (capabilities.serviceWorker) {
|
||||
await navigator.serviceWorker.register('/serviceWorker.js');
|
||||
await navigator.serviceWorker.ready;
|
||||
try {
|
||||
await navigator.serviceWorker.register('/serviceWorker.js');
|
||||
await navigator.serviceWorker.ready;
|
||||
} catch (e) {
|
||||
// continue but disable streaming downloads
|
||||
capabilities.streamDownload = false;
|
||||
}
|
||||
}
|
||||
|
||||
const translate = await getTranslator(LOCALE);
|
||||
|
Loading…
Reference in New Issue
Block a user