From 2ae93c0571aec4c1ad81db47befaace2a2f52517 Mon Sep 17 00:00:00 2001 From: Amelia Magee Date: Mon, 2 Dec 2024 14:11:44 +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..4acebb258 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]?.raw instanceof File){ dataTransfer.items.add(this.files[i].raw); wasFile = true; }