diff options
author | Vika <vika@fireburn.ru> | 2022-09-20 02:58:57 +0300 |
---|---|---|
committer | Vika <vika@fireburn.ru> | 2022-09-20 02:58:57 +0300 |
commit | be96c7e28e410df24f6f86acac1cf1fda306f546 (patch) | |
tree | 73fc1408642292f976d781dbeae774f1bf18f7dc /kittybox-rs | |
parent | cfc12adcb8dc680e5fa105e38d79825fb91a3f3b (diff) | |
download | kittybox-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')
-rw-r--r-- | kittybox-rs/src/frontend/indieauth.js | 2 |
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); |