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); }}