summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorJulian Hurst <julian.hurst@digdash.com>2025-01-23 11:10:29 +0100
committerJulian Hurst <julian.hurst@digdash.com>2025-01-23 11:10:29 +0100
commit904f84f0ea3ca2763b5138b48453f6abb26db979 (patch)
tree029ee1a3346ee046c8cb9c9a7d0b48bad3b4be68 /templates
parent70cf829b8258cec241dceeb9a02abee626935828 (diff)
downloadbox-904f84f0ea3ca2763b5138b48453f6abb26db979.tar.gz
Fix null use in js when not using token
Diffstat (limited to 'templates')
-rw-r--r--templates/index.html7
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) => {