From deb61623b2f2b3613033adc089980745ac81242a Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Wed, 9 Sep 2020 21:22:13 -0700 Subject: [PATCH] Don't try to upload dropped text --- resources/scripts/components/server/files/UploadButton.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/resources/scripts/components/server/files/UploadButton.tsx b/resources/scripts/components/server/files/UploadButton.tsx index a2151e5a3..f58891112 100644 --- a/resources/scripts/components/server/files/UploadButton.tsx +++ b/resources/scripts/components/server/files/UploadButton.tsx @@ -85,9 +85,7 @@ export default () => { e.stopPropagation(); setVisible(false); - if (e.dataTransfer === undefined || e.dataTransfer === null) { - return; - } + if (!e.dataTransfer?.files.length) return; onFileSubmission(e.dataTransfer.files); }}