diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 769a2f530..1139a2af7 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -61,12 +61,14 @@ export function DataFactory(dbService: NgxIndexedDBService, http: HttpClient) { deps: [HttpClient], }, }), - ServiceWorkerModule.register('ngsw-worker.js', { - enabled: AppConfig.production, - // Register the ServiceWorker as soon as the app is stable - // or after 30 seconds (whichever comes first). - registrationStrategy: 'registerWhenStable:30000', - }), + !isElectron + ? ServiceWorkerModule.register('ngsw-worker.js', { + enabled: AppConfig.production, + // Register the ServiceWorker as soon as the app is stable + // or after 30 seconds (whichever comes first). + registrationStrategy: 'registerWhenStable:30000', + }) + : [], ], providers: [ {