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',