diff options
| author | Karan Jayachandra <mail@karanjayachandra.com> | 2025-07-14 19:51:45 +0200 |
|---|---|---|
| committer | Karan Jayachandra <mail@karanjayachandra.com> | 2025-07-14 19:51:45 +0200 |
| commit | 4aee68096c11ce1e3762fb8cffbde2a14dfa3cd0 (patch) | |
| tree | 4ce0642a088fd2370ad0992916d5d41093bedc48 /app/static | |
| parent | 0396e1fbb46c7256095f05e37f2747baa3e20c73 (diff) | |
Added the login for changes
Diffstat (limited to 'app/static')
| -rw-r--r-- | app/static/custom.js | 10 |
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 |
