Skip to content

Commit

Permalink
fix errors reading undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
Angi-Kinas committed Jul 4, 2024
1 parent bf601eb commit 6fa87e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

<div class="flex flex-col pt-9 px-5 gap-10 bg-neutral-100 h-full grow">
<ng-container *ngIf="organisations$ | async as organisations">
<ng-container *ngIf="organisations[0].name">
<ng-container *ngIf="organisations[0]?.name">
<gn-ui-button
*ngIf="organisations[0].logoUrl?.href"
type="default"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class SidebarComponent implements OnInit {
this.organisations$ = combineLatest(
this.organisationsService.organisations$,
this.platformService.getMe(),
(orgs, me) => orgs.filter((org) => org.name === me.organisation)
(orgs, me) => orgs.filter((org) => org.name === me?.organisation)
)
}
}

0 comments on commit 6fa87e7

Please sign in to comment.