From e2fada209c193d478ff81e94ca47dca4be140456 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristj=C3=A1n=20Oddsson?= Date: Tue, 5 May 2020 09:57:46 +0100 Subject: [PATCH 1/2] default `transfer.files` to an empty array --- src/attachment.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 { From bc102b631e6f9cece913bca5c21d26f0afdd921f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristj=C3=A1n=20Oddsson?= Date: Thu, 7 May 2020 10:46:26 +0100 Subject: [PATCH 2/2] 1.0.3 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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",