From 87e67d81680ae3741f6757fb4322aee061ec21b5 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Fri, 15 Jan 2021 11:05:27 +0000 Subject: [PATCH] Skip the service worker for Electron At the moment, there's no point in installing the empty service worker on Electron. Fixes https://github.com/vector-im/element-web/issues/16008 --- src/vector/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vector/index.ts b/src/vector/index.ts index d9c63755f6..37cf623d88 100644 --- a/src/vector/index.ts +++ b/src/vector/index.ts @@ -30,7 +30,7 @@ import {parseQsFromFragment} from "./url_utils"; import './modernizr'; // load service worker if available on this platform -if ('serviceWorker' in navigator) { +if (!window.electron && 'serviceWorker' in navigator) { navigator.serviceWorker.register('sw.js'); }