From f04d3a16f387b7b3f5f6cc2496b28f764a4313a4 Mon Sep 17 00:00:00 2001 From: Robin <robin@robin.town> Date: Thu, 25 Jul 2024 15:22:42 -0400 Subject: [PATCH] Fix a crash when using the duplicate tiles option --- src/state/CallViewModel.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/state/CallViewModel.ts b/src/state/CallViewModel.ts index 54029b0b0..449603ad6 100644 --- a/src/state/CallViewModel.ts +++ b/src/state/CallViewModel.ts @@ -606,7 +606,12 @@ export class CallViewModel extends ViewModel { return combineLatest( [this.grid, this.spotlight, this.screenShares], (grid, spotlight, screenShares): Layout => - grid.length == 2 && screenShares.length === 0 + grid.length == 2 && + // There might not be a remote tile if only the local user + // is in the call and they're using the duplicate tiles + // option + grid.some((vm) => !vm.local) && + screenShares.length === 0 ? { type: "one-on-one", local: grid.find(