Skip to content

Commit

Permalink
refactor(service-worker): ensure compatibility with typescript strict…
Browse files Browse the repository at this point in the history
… flag
  • Loading branch information
devversion committed Jun 13, 2019
1 parent efcf156 commit 7a51f10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/service-worker/src/low_level.ts
Expand Up @@ -76,7 +76,7 @@ export class NgswCommChannel {
const currentController = defer(() => of (serviceWorker.controller));
const controllerWithChanges = concat(currentController, controllerChanges);

this.worker = controllerWithChanges.pipe(filter<ServiceWorker>(c => !!c));
this.worker = controllerWithChanges.pipe(filter((c): c is ServiceWorker => !!c));

this.registration = <Observable<ServiceWorkerRegistration>>(
this.worker.pipe(switchMap(() => serviceWorker.getRegistration())));
Expand Down

0 comments on commit 7a51f10

Please sign in to comment.