diff options
| author | Karan Jayachandra <mail@karanjayachandra.com> | 2025-07-14 20:16:07 +0200 |
|---|---|---|
| committer | Karan Jayachandra <mail@karanjayachandra.com> | 2025-07-14 20:16:07 +0200 |
| commit | b73e8f510f1b3a13d942e1ad42c8a04401eb6b8c (patch) | |
| tree | 26612c20e03adb3cb26c36f36d31576f3c77dc1c /app/static/custom.js | |
| parent | 072d546490ba6cd4422cbc9cd6644b455f58fd46 (diff) | |
| parent | 895ed4be433a4159250b276bd99f574c9c39c98e (diff) | |
Merge branch 'develop' into 'main'3.0
Develop
See merge request KaranJayachandra/match_up!17
Diffstat (limited to 'app/static/custom.js')
| -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 |
