From fcedced2d16308d2f3d32afc500905645bbfc873 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Mon, 24 Jan 2022 18:32:18 +0800 Subject: [PATCH] Prevent showing webauthn error for every time visiting `/user/settings/security` --- web_src/js/features/user-auth-webauthn.js | 7 +++---- 1 file 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 bc221d037fc9..cf60535d404d 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(); }); }