From 8f59f087cc6e01905c807579b1044884b1ef481c Mon Sep 17 00:00:00 2001 From: Hugh Nimmo-Smith Date: Wed, 20 Nov 2024 10:09:27 +0000 Subject: [PATCH] Fix incorrect type assertion --- src/state/CallViewModel.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/state/CallViewModel.ts b/src/state/CallViewModel.ts index b1d64a7c..f8f44069 100644 --- a/src/state/CallViewModel.ts +++ b/src/state/CallViewModel.ts @@ -663,9 +663,11 @@ export class CallViewModel extends ViewModel { switchMap((mediaItems) => { const localUserMedia = mediaItems.find( (m) => m.vm instanceof LocalUserMediaViewModel, - ) as LocalUserMediaViewModel | undefined; + ) as UserMedia | undefined; return ( - localUserMedia?.alwaysShow?.pipe( + ( + localUserMedia?.vm as LocalUserMediaViewModel + ).alwaysShow.pipe( map((alwaysShow) => alwaysShow ? localUserMedia : undefined, ),