From 206530a9405ff596b41c8e564b82b6c7afdaf658 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 16 Aug 2019 20:48:01 -0400 Subject: [PATCH] navigate in zone --- src/background/runtime.background.ts | 1 - src/popup/app.component.ts | 6 ++++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/background/runtime.background.ts b/src/background/runtime.background.ts index 22123d351d..40a19b2c9d 100644 --- a/src/background/runtime.background.ts +++ b/src/background/runtime.background.ts @@ -56,7 +56,6 @@ export default class RuntimeBackground { if (this.isSafari) { // Reload the popup when it's opened - // TODO /* this.runtime.addEventListener('popover', (event: any) => { const win: Window = event.target.contentWindow; diff --git a/src/popup/app.component.ts b/src/popup/app.component.ts index 1a1f0521d1..2efe175723 100644 --- a/src/popup/app.component.ts +++ b/src/popup/app.component.ts @@ -100,7 +100,7 @@ export class AppComponent implements OnInit { }); this.changeDetectorRef.detectChanges(); }); - } else if (msg.command === 'authBlocked') { + } else if (msg.command === 'authBlocked') { this.ngZone.run(() => { this.router.navigate(['home']); }); @@ -128,7 +128,9 @@ export class AppComponent implements OnInit { window.setTimeout(() => BrowserApi.reloadExtension(window), 2000); } } else if (msg.command === 'reloadPopup') { - this.router.navigate(['/']); + this.ngZone.run(() => { + this.router.navigate(['/']); + }); } else { msg.webExtSender = sender; this.broadcasterService.send(msg);