diff options
| author | Julian Hurst <julian.hurst@digdash.com> | 2025-01-23 11:10:29 +0100 |
|---|---|---|
| committer | Julian Hurst <julian.hurst@digdash.com> | 2025-01-23 11:10:29 +0100 |
| commit | 904f84f0ea3ca2763b5138b48453f6abb26db979 (patch) | |
| tree | 029ee1a3346ee046c8cb9c9a7d0b48bad3b4be68 | |
| parent | 70cf829b8258cec241dceeb9a02abee626935828 (diff) | |
| download | box-904f84f0ea3ca2763b5138b48453f6abb26db979.tar.gz | |
Fix null use in js when not using token
| -rw-r--r-- | templates/index.html | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/templates/index.html b/templates/index.html index 97f5eca..bafd7eb 100644 --- a/templates/index.html +++ b/templates/index.html @@ -5,7 +5,12 @@ <title>box</title> <script> function upload() { - token = document.getElementById("token").value + token = document.getElementById("token"); + if (token == null) { + token = ""; + } else { + token = token.value; + } f = document.getElementById("file").files[0]; const xhr = new XMLHttpRequest(); xhr.upload.addEventListener("progress", (e) => { |
