From be96c7e28e410df24f6f86acac1cf1fda306f546 Mon Sep 17 00:00:00 2001 From: Vika Date: Tue, 20 Sep 2022 02:58:57 +0300 Subject: frontend: fix indieauth page crashing if no scopes requested JavaScript is a hellpit i want out of it please help me --- kittybox-rs/src/frontend/indieauth.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'kittybox-rs/src') 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); -- cgit 1.4.1