load collections after ngOninit has run (#8691)

This commit is contained in:
SmithThe4th 2024-04-12 14:53:26 +01:00 committed by GitHub
parent d026087bfd
commit a12c7242d6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View File

@ -75,6 +75,7 @@ export class AddEditComponent extends BaseAddEditComponent implements OnChanges,
async ngOnInit() {
await super.ngOnInit();
await this.load();
this.broadcasterService.subscribe(BroadcasterSubscriptionId, async (message: any) => {
this.ngZone.run(() => {
switch (message.command) {

View File

@ -592,7 +592,7 @@ export class AddEditComponent implements OnInit, OnDestroy {
this.writeableCollections.forEach((c) => ((c as any).checked = false));
}
if (this.cipher.organizationId != null) {
this.collections = this.writeableCollections.filter(
this.collections = this.writeableCollections?.filter(
(c) => c.organizationId === this.cipher.organizationId,
);
const org = await this.organizationService.get(this.cipher.organizationId);