Skip to content

Commit

Permalink
Fix a null reference bug
Browse files Browse the repository at this point in the history
  • Loading branch information
sondreb committed Nov 7, 2024
1 parent 2fd7c48 commit b7aaa1a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/src/app/communities/communities.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
</mat-card> -->

<div class="container responsive-grid">
@for(community of dataSource.data; track community) {
@if (dataSource) { @for(community of dataSource.data; track community) {
<mat-card>
<mat-card-header>
<mat-card-title
Expand All @@ -81,7 +81,7 @@
<button mat-button (click)="join(community.id)">JOIN</button>
</mat-card-actions>
</mat-card>
}
} }

<!-- @for(card of cards(); track card) {
<mat-card>
Expand Down
2 changes: 1 addition & 1 deletion app/src/app/communities/communities.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export class CommunitiesComponent {
// }

//viewStyle = signal('card');
viewStyle = model<string>('table');
viewStyle = model<string>('card');

checked = model<boolean>(false);

Expand Down

0 comments on commit b7aaa1a

Please sign in to comment.