We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ERROR TypeError: Cannot read property 'isFile' of null
Tested on Chrome latest by dragging text from my website to the drop zone.
The code where the error is present:
for (var i = 0; i < length; i++) { var entry; if (event.dataTransfer.items) { if (event.dataTransfer.items[i].webkitGetAsEntry) { entry = event.dataTransfer.items[i].webkitGetAsEntry(); } } else { if (event.dataTransfer.files[i].webkitGetAsEntry) { entry = event.dataTransfer.files[i].webkitGetAsEntry() } } if (entry.isFile) { // <--- Error occurs here const toUpload: UploadFile = new UploadFile(entry.name, entry); this.addToQueue(toUpload); } else if (entry.isDirectory) { this.traverseFileTree(entry, entry.name); } }
Solution:
Check if entry is null before checking entry.isFile
The text was updated successfully, but these errors were encountered:
@georgipeltekov what should be the expected behavior?
Sorry, something went wrong.
I think we just need to ignore this case
Fixes georgipeltekov#22
b925a22
No branches or pull requests
ERROR TypeError: Cannot read property 'isFile' of null
Tested on Chrome latest by dragging text from my website to the drop zone.
The code where the error is present:
Solution:
Check if entry is null before checking entry.isFile
The text was updated successfully, but these errors were encountered: