about summary refs log tree commit diff
path: root/kittybox-rs/src/frontend/indieauth.js
diff options
context:
space:
mode:
authorVika <vika@fireburn.ru>2022-09-20 02:58:57 +0300
committerVika <vika@fireburn.ru>2022-09-20 02:58:57 +0300
commitbe96c7e28e410df24f6f86acac1cf1fda306f546 (patch)
tree73fc1408642292f976d781dbeae774f1bf18f7dc /kittybox-rs/src/frontend/indieauth.js
parentcfc12adcb8dc680e5fa105e38d79825fb91a3f3b (diff)
downloadkittybox-be96c7e28e410df24f6f86acac1cf1fda306f546.tar.zst
frontend: fix indieauth page crashing if no scopes requested
JavaScript is a hellpit i want out of it please help me
Diffstat (limited to 'kittybox-rs/src/frontend/indieauth.js')
-rw-r--r--kittybox-rs/src/frontend/indieauth.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/kittybox-rs/src/frontend/indieauth.js b/kittybox-rs/src/frontend/indieauth.js
index 03626b8..1762bdd 100644
--- a/kittybox-rs/src/frontend/indieauth.js
+++ b/kittybox-rs/src/frontend/indieauth.js
@@ -47,7 +47,7 @@ async function submit_handler(e) {
   e.preventDefault();
   const form = e.target;
 
-  const scopes = Array.from(form.elements.scope)
+  let scopes = form.elements.scope === undefined ? [] : Array.from(form.elements.scope)
       .filter(e => e.checked)
       .map(e => e.value);