diff --git a/src/components/views/voip/VideoFeed.tsx b/src/components/views/voip/VideoFeed.tsx index 397d11bfca..51d2adb845 100644 --- a/src/components/views/voip/VideoFeed.tsx +++ b/src/components/views/voip/VideoFeed.tsx @@ -80,7 +80,10 @@ export default class VideoFeed extends React.Component { } private setElementRef = (element: HTMLVideoElement): void => { - if (!element) element.removeEventListener('resize', this.onResize); + if (!element) { + this.element?.removeEventListener('resize', this.onResize); + return; + } this.element = element; element.addEventListener('resize', this.onResize);