diff --git a/react/features/virtual-background/components/UploadImageButton.tsx b/react/features/virtual-background/components/UploadImageButton.tsx index 917dd55ee6a2..ceffe02873a1 100644 --- a/react/features/virtual-background/components/UploadImageButton.tsx +++ b/react/features/virtual-background/components/UploadImageButton.tsx @@ -89,9 +89,14 @@ function UploadImageButton({ const uploadImage = useCallback(async e => { - const reader = new FileReader(); const imageFile = e.target.files; + if (!imageFile) { + return; + } + + const reader = new FileReader(); + reader.readAsDataURL(imageFile[0]); reader.onload = async () => { const url = await resizeImage(reader.result);