Skip to content

Commit b4514d0

Browse files
committed
Handle fsEntry === null in fromFileSystemEntry
1 parent 6d80f9f commit b4514d0

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@alttiri/vue-file-input",
3-
"version": "1.6.0-20240819",
3+
"version": "1.6.1-20251108",
44
"type": "module",
55
"description": "Vue.js file input with Drag and Drop support.",
66
"homepage": "https://github.com/alttiri/vue-file-input",

src/components/WebFileEntry.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,9 @@ export class WebFileEntry {
128128
}
129129

130130
async function fromFileSystemEntry(fsEntry: FileSystemEntry, parent: WebFileEntry | undefined, recursive = false, file: File): Promise<WebFileEntry | null> {
131+
if (fsEntry === null) { // drop from long path
132+
console.error("[fromFileSystemEntry][error] FileSystemEntry is null", file);
133+
}
131134
if (fsEntry.isFile) {
132135
try {
133136
const file = await toFile(fsEntry as FileSystemFileEntry); // as

0 commit comments

Comments
 (0)