summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--web_src/js/features/user-auth-webauthn.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/web_src/js/features/user-auth-webauthn.js b/web_src/js/features/user-auth-webauthn.js
index bc221d037f..cf60535d40 100644
--- a/web_src/js/features/user-auth-webauthn.js
+++ b/web_src/js/features/user-auth-webauthn.js
@@ -150,13 +150,12 @@ export function initUserAuthWebAuthnRegister() {
return;
}
- if (!detectWebAuthnSupport()) {
- return;
- }
-
$('#webauthn-error').modal({allowMultiple: false});
$('#register-webauthn').on('click', (e) => {
e.preventDefault();
+ if (!detectWebAuthnSupport()) {
+ return;
+ }
webAuthnRegisterRequest();
});
}