diff --git a/src/app/vault/ciphers.component.ts b/src/app/vault/ciphers.component.ts index 69ad0186ee2..23b7f06642f 100644 --- a/src/app/vault/ciphers.component.ts +++ b/src/app/vault/ciphers.component.ts @@ -55,14 +55,17 @@ export class CiphersComponent extends BaseCiphersComponent implements OnDestroy super(searchService); } - async ngOnInit() { - this.userHasPremiumAccess = await this.stateService.getCanAccessPremium(); - } - ngOnDestroy() { this.selectAll(false); } + // load() is called after the page loads and the first sync has completed. + // Do not use ngOnInit() for anything that requires sync data. + async load(filter: (cipher: CipherView) => boolean = null, deleted: boolean = false) { + await super.load(filter, deleted); + this.userHasPremiumAccess = await this.stateService.getCanAccessPremium(); + } + loadMore() { if (this.ciphers.length <= this.pageSize) { return;