Browse Source

Add missing conditional

Manav Rathi 1 year ago
parent
commit
94ec766bc6
1 changed files with 4 additions and 2 deletions
  1. 4 2
      web/apps/photos/src/components/ml/PeopleList.tsx

+ 4 - 2
web/apps/photos/src/components/ml/PeopleList.tsx

@@ -175,8 +175,10 @@ const FaceCropImageView: React.FC<FaceCropImageViewProps> = ({
                 );
                 );
             })*/
             })*/
                 .then((data) => {
                 .then((data) => {
-                    const blob = new Blob([data]);
-                    if (!didCancel) setObjectURL(URL.createObjectURL(blob));
+                    if (data) {
+                        const blob = new Blob([data]);
+                        if (!didCancel) setObjectURL(URL.createObjectURL(blob));
+                    }
                 });
                 });
         } else setObjectURL(undefined);
         } else setObjectURL(undefined);