From 16f7f847fa48de668b21f4b979df47cfddceaf35 Mon Sep 17 00:00:00 2001 From: biglyderv Date: Mon, 25 Nov 2024 14:12:43 -0500 Subject: [PATCH] sdfgs --- static/main.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/static/main.js b/static/main.js index bb52829..65c7cda 100644 --- a/static/main.js +++ b/static/main.js @@ -5,7 +5,9 @@ async function formClick(ev) { let fData = new FormData(target); - target.querySelector('input[type=file]').value = null; + let file = target.querySelector('input[type=file]'); + if (file) + file.value = null; let fetched = await fetch(target.action, { 'method': 'POST',