Skip to content
New issue

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

Continue reading entries broken #52

Closed
Borewit opened this issue Jan 6, 2020 · 2 comments
Closed

Continue reading entries broken #52

Borewit opened this issue Jan 6, 2020 · 2 comments

Comments

@Borewit
Copy link
Contributor

Borewit commented Jan 6, 2020

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

@nstephenh
Copy link

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

@Borewit
Copy link
Contributor Author

Borewit commented Jun 9, 2020

Should be fixed by merging PR #51 @feross.

@t-mullen t-mullen closed this as completed Jul 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants