From 4aee68096c11ce1e3762fb8cffbde2a14dfa3cd0 Mon Sep 17 00:00:00 2001 From: Karan Jayachandra Date: Mon, 14 Jul 2025 19:51:45 +0200 Subject: Added the login for changes --- app/static/custom.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'app/static') diff --git a/app/static/custom.js b/app/static/custom.js index 47f64ca..1d36493 100644 --- a/app/static/custom.js +++ b/app/static/custom.js @@ -87,9 +87,11 @@ document.getElementById("timer-dec").addEventListener('click', ()=> { }); const fileInput = document.querySelector("#file-js input[type=file]"); - fileInput.onchange = () => { - if (fileInput.files.length > 0) { - const fileName = document.querySelector("#file-js .file-name"); - fileName.textContent = fileInput.files[0].name; + if (fileInput !== null) { + fileInput.onchange = () => { + if (fileInput.files.length > 0) { + const fileName = document.querySelector("#file-js .file-name"); + fileName.textContent = fileInput.files[0].name; + } } }; \ No newline at end of file -- cgit v1.3.1