check for files.length

This commit is contained in:
j 2016-01-13 21:47:32 +05:30
parent 4ad2fbf698
commit fcc03c742d

View file

@ -116,7 +116,7 @@
}, },
drop: function(event) { drop: function(event) {
$('#importScreen').remove(); $('#importScreen').remove();
if (event.originalEvent.dataTransfer.files) { if (event.originalEvent.dataTransfer.files.length) {
event.originalEvent.preventDefault(); event.originalEvent.preventDefault();
event.originalEvent.stopPropagation(); event.originalEvent.stopPropagation();
oml.upload(event.originalEvent.dataTransfer.files, function(response) { oml.upload(event.originalEvent.dataTransfer.files, function(response) {