mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-07 22:50:53 +03:00
split serviceWorker and streamDownload capabilities
This commit is contained in:
@@ -28,8 +28,9 @@ if (process.env.NODE_ENV === 'production') {
|
||||
(async function start() {
|
||||
const app = routes(choo());
|
||||
const capa = await capabilities();
|
||||
if (capa.streamDownload) {
|
||||
navigator.serviceWorker.register('/serviceWorker.js');
|
||||
if (capa.serviceWorker) {
|
||||
await navigator.serviceWorker.register('/serviceWorker.js');
|
||||
await navigator.serviceWorker.ready;
|
||||
}
|
||||
|
||||
const translate = await getTranslator(LOCALE);
|
||||
|
||||
Reference in New Issue
Block a user