summaryrefslogtreecommitdiff
path: root/app/static/custom.js
diff options
context:
space:
mode:
authorKaran Jayachandra <mail@karanjayachandra.com>2025-07-14 19:51:45 +0200
committerKaran Jayachandra <mail@karanjayachandra.com>2025-07-14 19:51:45 +0200
commit4aee68096c11ce1e3762fb8cffbde2a14dfa3cd0 (patch)
tree4ce0642a088fd2370ad0992916d5d41093bedc48 /app/static/custom.js
parent0396e1fbb46c7256095f05e37f2747baa3e20c73 (diff)
Added the login for changes
Diffstat (limited to 'app/static/custom.js')
-rw-r--r--app/static/custom.js10
1 files changed, 6 insertions, 4 deletions
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