Fix updating member state with no existing calls

This commit is contained in:
Robert Long
2021-10-22 11:27:02 -07:00
parent 3b0d1b2696
commit b4d8c0b603
+2 -2
View File
@@ -538,11 +538,11 @@ export class GroupCall extends EventEmitter {
let calls: IGroupCallRoomMemberCallState[] = [];
let existingCallIndex: number;
if (memberCallState) {
if (memberStateEvent) {
calls = memberStateEvent["m.calls"] || [];
existingCallIndex = calls.findIndex((call) => call && call["m.call_id"] === this.groupCallId);
} else {
existingCallIndex = 0;
existingCallIndex = -1;
}
if (existingCallIndex === -1) {