Fix bug with dropping empty map

This commit is contained in:
Mitchell McCaffrey 2020-04-15 21:57:18 +10:00
parent 279d83122f
commit b76a70ca81

View File

@ -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);