Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(virtual-background) fix image upload cancelling

Saúl Ibarra Corretgé4e033fff4bca
diff --git a/react/features/virtual-background/components/UploadImageButton.tsx b/react/features/virtual-background/components/UploadImageButton.tsx
index 917dd55ee6..ceffe02873 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);