diff --git a/bigbluebutton-html5/imports/ui/components/chat/message-list/message-list-item/component.jsx b/bigbluebutton-html5/imports/ui/components/chat/message-list/message-list-item/component.jsx index ba01f8f39b..b71363064c 100644 --- a/bigbluebutton-html5/imports/ui/components/chat/message-list/message-list-item/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/chat/message-list/message-list-item/component.jsx @@ -24,6 +24,7 @@ const eventsToBeBound = [ ]; const isElementInViewport = (el) => { + if (!el) return false; const rect = el.getBoundingClientRect(); const prefetchHeight = 125; diff --git a/bigbluebutton-html5/imports/ui/components/chat/message-list/message-list-item/message/component.jsx b/bigbluebutton-html5/imports/ui/components/chat/message-list/message-list-item/message/component.jsx index 614d2f2886..2d915182a8 100644 --- a/bigbluebutton-html5/imports/ui/components/chat/message-list/message-list-item/message/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/chat/message-list/message-list-item/message/component.jsx @@ -18,6 +18,7 @@ const eventsToBeBound = [ ]; const isElementInViewport = (el) => { + if (!el) return false; const rect = el.getBoundingClientRect(); return (