fix: add check for potential undefined userId

This commit is contained in:
Joao Victor 2022-06-28 17:41:03 -03:00
parent 75efa60f7d
commit 4b9f16ca0f
2 changed files with 2 additions and 2 deletions

View File

@ -201,7 +201,7 @@ const VideoListItem = (props) => {
fullscreen={isFullscreenContext}
data-test={talking ? 'webcamItemTalkingUser' : 'webcamItem'}
animations={animations}
{...makeDragOperations(onVirtualBgDrop, user.userId)}
{...makeDragOperations(onVirtualBgDrop, user?.userId)}
>
{
videoIsReady

View File

@ -58,7 +58,7 @@ const DragAndDrop = (props) => {
}, []);
const makeDragOperations = (onAction, userId) => {
if (Auth.userID !== userId || !ENABLE_WEBCAM_BACKGROUND_UPLOAD) return {};
if (!userId || Auth.userID !== userId || !ENABLE_WEBCAM_BACKGROUND_UPLOAD) return {};
const startAndSaveVirtualBackground = (file) => {
const { readFile } = VirtualBgService;