Skip to content

Commit fa13784

Browse files
committed
More resilient check
1 parent c3a0795 commit fa13784

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ const options = {
163163
// Set to `true` to recursively open files in all subdirectories, defaults to `false`.
164164
recursive: true,
165165
// Open the directory with `"read"` or `"readwrite"` permission, defaults to `"read"`.
166-
mode:
166+
mode:
167167
// Suggested directory in which the file picker opens. A well-known directory, or a file or directory handle.
168168
startIn: 'downloads',
169169
// By specifying an ID, the user agent can remember different directories for different IDs.

demo/script.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ import { imageToBlob } from './image-to-blob.mjs';
4646

4747
const listDirectory = (blobs) => {
4848
let fileStructure = '';
49-
if (!blobs.length || !(blobs[0] instanceof File)) {
49+
if (blobs.length && !(blobs[0] instanceof File)) {
5050
return (pre.textContent += 'No files in directory.\n');
5151
}
5252
blobs

0 commit comments

Comments
 (0)