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) => {
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,
),