1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-02 08:40:08 +01:00

async fixes

This commit is contained in:
Kyle Spearrin 2019-08-16 21:01:08 -04:00
parent a3f76cfd3a
commit 3719095b18

View File

@ -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);