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
pull/16157/head
J. Ryan Stinnett 2021-01-15 11:05:27 +00:00
parent 0e14dc06fb
commit 87e67d8168
1 changed files with 1 additions and 1 deletions

View File

@ -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');
}