Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(test): Make sure test doesn't error out.

Jaya Allamsettyc58657c759ee
diff --git a/react/features/base/testing/functions.js b/react/features/base/testing/functions.js
index c2d22ba8f8..19081aee4f 100644
--- a/react/features/base/testing/functions.js
+++ b/react/features/base/testing/functions.js
@@ -52,7 +52,7 @@ export function isLargeVideoReceived({ getState }: Object): boolean {
*/
export function isRemoteVideoReceived({ getState }: Object, id: String): boolean {
const videoTrack = getTrackByMediaTypeAndParticipant(getState()['features/base/tracks'], MEDIA_TYPE.VIDEO, id);
- const lastMediaEvent = videoTrack.lastMediaEvent;
+ const lastMediaEvent = videoTrack?.lastMediaEvent;
return !videoTrack.muted && (lastMediaEvent === 'playing' || lastMediaEvent === 'canplaythrough');
}