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