Skip to content

Commit

Permalink
Correct example code for file and directory. (#223)
Browse files Browse the repository at this point in the history
handleFileEntry() should be called for entry.kind of 'file' and vice versa for directories.
  • Loading branch information
adanilo authored Aug 25, 2020
1 parent 3dd57a2 commit 555d61c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1540,9 +1540,9 @@ elem.addEventListener('drop', async (e) => {
if (item.kind === 'file') {
const entry = await item.getAsFileSystemHandle();
if (entry.kind === 'file') {
handleDirectoryEntry(entry);
} else if (entry.kind === 'directory') {
handleFileEntry(entry);
} else if (entry.kind === 'directory') {
handleDirectoryEntry(entry);
}
}
}
Expand Down

0 comments on commit 555d61c

Please sign in to comment.