From 8425e655443d44b812faf1b25bed7af1b3761d03 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Sat, 29 Sep 2018 17:33:35 -0400 Subject: [PATCH] reload for edge if bg is null --- src/popup/services/launch-guard.service.ts | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/popup/services/launch-guard.service.ts b/src/popup/services/launch-guard.service.ts index fb32eb2b44..efb73b245d 100644 --- a/src/popup/services/launch-guard.service.ts +++ b/src/popup/services/launch-guard.service.ts @@ -16,10 +16,17 @@ export class LaunchGuardService implements CanActivate { async canActivate() { const bg = BrowserApi.getBackgroundPage(); if (bg == null) { - // tslint:disable-next-line - console.log('Background page is null.'); - // tslint:disable-next-line - console.log(bg); + if (window.navigator.userAgent.indexOf(' Edge/') !== -1) { + // tslint:disable-next-line + console.log('Background page is null.'); + // tslint:disable-next-line + console.log(bg); + window.setTimeout(() => { + // tslint:disable-next-line + console.log('Reload page for Edge.'); + window.location.reload(); + }, 1000); + } this.router.navigate(['private-mode']); return false; }