From 3719095b1828fe3010f28c720c5a9159b403ed4f Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 16 Aug 2019 21:01:08 -0400 Subject: [PATCH] async fixes --- src/popup/vault/current-tab.component.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/popup/vault/current-tab.component.ts b/src/popup/vault/current-tab.component.ts index c31284777e..d93bad7d86 100644 --- a/src/popup/vault/current-tab.component.ts +++ b/src/popup/vault/current-tab.component.ts @@ -70,18 +70,18 @@ export class CurrentTabComponent implements OnInit, OnDestroy { private changeDetectorRef: ChangeDetectorRef, private syncService: SyncService, private searchService: SearchService, private storageService: StorageService, route: ActivatedRoute) { - route.params.subscribe((val) => { + route.params.subscribe(async (val) => { console.log('route.params.subscribe'); if (platformUtilsService.getDevice() === DeviceType.SafariExtension) { console.log(val); - this.init(); + await this.init(); } }); } async ngOnInit() { console.log('ngOnInit'); - this.init(); + await this.init(); } ngOnDestroy() { @@ -157,7 +157,7 @@ export class CurrentTabComponent implements OnInit, OnDestroy { }, 200); } - private init() { + private async init() { this.showLeftHeader = this.searchTypeSearch = !this.platformUtilsService.isSafari(); this.inSidebar = this.popupUtilsService.inSidebar(window);