Add missing conditional

This commit is contained in:
Manav Rathi 2024-05-06 19:42:42 +05:30
parent 66f705ed9b
commit 94ec766bc6
No known key found for this signature in database

View file

@ -175,8 +175,10 @@ const FaceCropImageView: React.FC<FaceCropImageViewProps> = ({
);
})*/
.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);