From 2f3f9f95eb6ed5961ff7769c246b0a29a97d181c Mon Sep 17 00:00:00 2001 From: Robin Date: Mon, 8 Dec 2025 23:38:15 -0500 Subject: [PATCH] Use more compact optional chaining and coalescing notation --- src/state/CallViewModel/remoteMembers/ConnectionManager.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/state/CallViewModel/remoteMembers/ConnectionManager.ts b/src/state/CallViewModel/remoteMembers/ConnectionManager.ts index 09a8e79f..755ba3dd 100644 --- a/src/state/CallViewModel/remoteMembers/ConnectionManager.ts +++ b/src/state/CallViewModel/remoteMembers/ConnectionManager.ts @@ -60,11 +60,7 @@ export class ConnectionManagerData { transport: LivekitTransport, ): (LocalParticipant | RemoteParticipant)[] { const key = transport.livekit_service_url + "|" + transport.livekit_alias; - const existing = this.store.get(key); - if (existing) { - return existing[1]; - } - return []; + return this.store.get(key)?.[1] ?? []; } /** * Get all connections where the given participant is publishing.