mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-29 14:16:36 +00:00
Fix error when event.dataTransfer.files is empty
Changelog-entry: Fix error when event.dataTransfer.files is empty Change-type: patch
This commit is contained in:
parent
f0374cf9d9
commit
5299d958f2
@ -51,9 +51,11 @@ module.exports = ($timeout) => {
|
||||
|
||||
domElement.ondrop = (event) => {
|
||||
event.preventDefault()
|
||||
|
||||
if (event.dataTransfer.files.length) {
|
||||
const filename = _.first(event.dataTransfer.files).path
|
||||
|
||||
// Safely bring this to the word of Angular
|
||||
// Safely bring this to the world of Angular
|
||||
$timeout(() => {
|
||||
scope.osDropzone({
|
||||
|
||||
@ -63,6 +65,7 @@ module.exports = ($timeout) => {
|
||||
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user