diff --git a/package-lock.json b/package-lock.json index 8c2cbd6..c012042 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@github/file-attachment-element", - "version": "1.0.2", + "version": "1.0.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index cb40389..858bb75 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@github/file-attachment-element", - "version": "1.0.2", + "version": "1.0.3", "description": "Attach files via drag and drop or file input.", "main": "dist/index.umd.js", "module": "dist/index.js", diff --git a/src/attachment.ts b/src/attachment.ts index d1aa159..19a466b 100644 --- a/src/attachment.ts +++ b/src/attachment.ts @@ -97,7 +97,7 @@ function transferredFiles(transfer: DataTransfer, directory: boolean): Promise new Attachment(f))) + return Promise.resolve(visible(Array.from(transfer.files || [])).map(f => new Attachment(f))) } function hidden(file: File | FileSystemEntry): boolean {