fix: Fixed handling of null-values for shard in chatroom-uri frontend
authorKai Moritz <kai@juplo.de>
Sat, 23 Sep 2023 09:12:12 +0000 (11:12 +0200)
committerKai Moritz <kai@juplo.de>
Sat, 23 Sep 2023 09:12:12 +0000 (11:12 +0200)
src/app/chatrooms/chatrooms.component.html

index 76aa148..b046c28 100644 (file)
@@ -3,6 +3,6 @@
     <h1 class="h5">Please Choose a Chat-Room</h1>
   </div>
   <div class="card-body d-grid gap-1">
-    <button *ngFor="let chatroom of chatrooms" routerLink="/chatroom/{{chatroom.shard}}/{{chatroom.id}}" type="button" class="btn btn-outline-primary">{{chatroom.name}}</button>
+    <button *ngFor="let chatroom of chatrooms" routerLink="/chatroom/{{chatroom.shard ? chatroom.shard : '_'}}/{{chatroom.id}}" type="button" class="btn btn-outline-primary">{{chatroom.name}}</button>
   </div>
 </div>