feross/drag-drop

Continue reading entries broken

Borewit opened this issue · 2 comments

It looks like the recursion, to read more entries is called with missing argument reader.

I am getting the following error:

Uncaught TypeError: Cannot read property 'readEntries' of undefined
    at readEntries (C:\Users\Borewit\code\github\drag-drop\index.js:176)
    at C:\Users\Borewit\code\github\drag-drop\index.js:179

original issue: webtorrent-desktop#1771

drag-drop/index.js

Lines 175 to 184 in 89fd6bd

function readEntries (reader) {
reader.readEntries(entries_ => {
if (entries_.length > 0) {
entries = entries.concat(Array.from(entries_))
readEntries() // continue reading entries until `readEntries` returns no more
} else {
doneEntries()
}
})
}

I think like 179 should be:

readEntries(reader)

PR: #53 #51

I would like to use drag-drop for dropping in a directory into the browser, is there any update on this?

Should be fixed by merging PR #51 @feross.