mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-07 14:40:55 +03:00
disable streaming download if registering sw fails. fixes #1226
This commit is contained in:
@@ -35,8 +35,13 @@ if (process.env.NODE_ENV === 'production') {
|
|||||||
return window.location.assign('/unsupported/crypto');
|
return window.location.assign('/unsupported/crypto');
|
||||||
}
|
}
|
||||||
if (capabilities.serviceWorker) {
|
if (capabilities.serviceWorker) {
|
||||||
|
try {
|
||||||
await navigator.serviceWorker.register('/serviceWorker.js');
|
await navigator.serviceWorker.register('/serviceWorker.js');
|
||||||
await navigator.serviceWorker.ready;
|
await navigator.serviceWorker.ready;
|
||||||
|
} catch (e) {
|
||||||
|
// continue but disable streaming downloads
|
||||||
|
capabilities.streamDownload = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const translate = await getTranslator(LOCALE);
|
const translate = await getTranslator(LOCALE);
|
||||||
|
|||||||
Reference in New Issue
Block a user