From 555d61cda881f82eabb3d5f06761eb787da3d7f3 Mon Sep 17 00:00:00 2001 From: Alex Danilo Date: Tue, 25 Aug 2020 10:59:10 +1000 Subject: [PATCH] Correct example code for file and directory. (#223) handleFileEntry() should be called for entry.kind of 'file' and vice versa for directories. --- index.bs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.bs b/index.bs index 7e0a877..c47f619 100644 --- a/index.bs +++ b/index.bs @@ -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); } } }