Fix bug with dropping empty map
This commit is contained in:
parent
279d83122f
commit
b76a70ca81
@ -48,7 +48,7 @@ function AddMapModal({
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
const file = event.dataTransfer.files[0];
|
const file = event.dataTransfer.files[0];
|
||||||
if (file.type.startsWith("image")) {
|
if (file && file.type.startsWith("image")) {
|
||||||
onImageUpload(file);
|
onImageUpload(file);
|
||||||
}
|
}
|
||||||
setDragging(false);
|
setDragging(false);
|
||||||
|
Loading…
Reference in New Issue
Block a user