Fix incorrect type assertion

This commit is contained in:
Hugh Nimmo-Smith 2024-11-20 10:09:27 +00:00
parent 23579b2ab1
commit 8f59f087cc

View File

@ -663,9 +663,11 @@ export class CallViewModel extends ViewModel {
switchMap((mediaItems) => { switchMap((mediaItems) => {
const localUserMedia = mediaItems.find( const localUserMedia = mediaItems.find(
(m) => m.vm instanceof LocalUserMediaViewModel, (m) => m.vm instanceof LocalUserMediaViewModel,
) as LocalUserMediaViewModel | undefined; ) as UserMedia | undefined;
return ( return (
localUserMedia?.alwaysShow?.pipe( (
localUserMedia?.vm as LocalUserMediaViewModel
).alwaysShow.pipe(
map((alwaysShow) => map((alwaysShow) =>
alwaysShow ? localUserMedia : undefined, alwaysShow ? localUserMedia : undefined,
), ),