Commit 0cdf8be
committed
fix(call): guard against a missing local state broadcaster when leaving a call
The "beforeLeaveCall" handler assumes that "beforeJoinCall" ran before it and
left a broadcaster behind. The variable is null whenever the call was not
joined in this page session, and it is set back to null after the first
leave. leaveRoom() calls leaveCurrentCall() unconditionally, so leaving or
switching a conversation reaches the handler either way and raises "Cannot
read properties of null (reading 'destroy')".
The exception is raised inside the promise chain of leaveCall(), so it aborts
whatever the caller was doing, for example the switchto handling that moves
participants to another conversation when a one-to-one conversation is
extended into a group conversation.
Signed-off-by: Baki Burak Öğün <63836730+bakiburakogun@users.noreply.github.com>1 parent c66614e commit 0cdf8be
1 file changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
525 | 525 | | |
526 | 526 | | |
527 | 527 | | |
528 | | - | |
529 | | - | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
530 | 532 | | |
531 | 533 | | |
532 | 534 | | |
| |||
0 commit comments