Merge pull request #16148 from ramonlsouza/early-return-video-item

fix: do not render video list item if user data is unavailable
This commit is contained in:
Anton Georgiev 2022-12-15 12:53:50 -05:00 committed by GitHub
commit 25061e0670
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,7 +7,7 @@ import VideoListItem from './component';
import { layoutSelect, layoutDispatch } from '/imports/ui/components/layout/context';
const VideoListItemContainer = (props) => {
const { cameraId } = props;
const { cameraId, user } = props;
const fullscreen = layoutSelect((i) => i.fullscreen);
const { element } = fullscreen;
@ -15,6 +15,8 @@ const VideoListItemContainer = (props) => {
const layoutContextDispatch = layoutDispatch();
const isRTL = layoutSelect((i) => i.isRTL);
if (!user) return null;
return (
<VideoListItem
{...props}