From 0dc1a7eb737a25691fd6f8aa421e0c557082ea91 Mon Sep 17 00:00:00 2001 From: Amelia Magee Date: Mon, 2 Dec 2024 14:27:35 +0000 Subject: [PATCH] Add null handling for tests --- js/DropZone/DropZone.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/DropZone/DropZone.js b/js/DropZone/DropZone.js index 8da095066..4c9b29c8d 100644 --- a/js/DropZone/DropZone.js +++ b/js/DropZone/DropZone.js @@ -114,7 +114,7 @@ export default class DropZone { const dataTransfer = new DataTransfer(); let wasFile = false; for (let i = 0; i < this.files.length; i++) { - if (this.files[i].raw instanceof File){ + if (this.files[i] && this.files[i].raw instanceof File){ dataTransfer.items.add(this.files[i].raw); wasFile = true; }