Use more compact optional chaining and coalescing notation
This commit is contained in:
@@ -60,11 +60,7 @@ export class ConnectionManagerData {
|
|||||||
transport: LivekitTransport,
|
transport: LivekitTransport,
|
||||||
): (LocalParticipant | RemoteParticipant)[] {
|
): (LocalParticipant | RemoteParticipant)[] {
|
||||||
const key = transport.livekit_service_url + "|" + transport.livekit_alias;
|
const key = transport.livekit_service_url + "|" + transport.livekit_alias;
|
||||||
const existing = this.store.get(key);
|
return this.store.get(key)?.[1] ?? [];
|
||||||
if (existing) {
|
|
||||||
return existing[1];
|
|
||||||
}
|
|
||||||
return [];
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Get all connections where the given participant is publishing.
|
* Get all connections where the given participant is publishing.
|
||||||
|
|||||||
Reference in New Issue
Block a user