From 903a157de2bbf6c61545cccfbb91468199c7f2e5 Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Tue, 31 Jan 2023 16:48:48 +0530 Subject: [PATCH] Don't show toast if room is not available --- src/domain/session/toast/ToastCollectionViewModel.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/domain/session/toast/ToastCollectionViewModel.ts b/src/domain/session/toast/ToastCollectionViewModel.ts index 709f5b81..78961029 100644 --- a/src/domain/session/toast/ToastCollectionViewModel.ts +++ b/src/domain/session/toast/ToastCollectionViewModel.ts @@ -39,6 +39,9 @@ export class ToastCollectionViewModel extends ViewModel { onAdd(_, call: GroupCall) { if (this._shouldShowNotification(call)) { const room = this._findRoomForCall(call); + if (!room) { + return; + } const dismiss = () => { const idx = this.toastViewModels.array.findIndex(vm => vm.call === call); if (idx !== -1) {