diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2022-01-25 03:57:01 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-24 14:57:01 -0500 |
commit | 9837773f0e5267297e99b7267c9f19d23d63232d (patch) | |
tree | c9f26ce86c7e9dcc7219323c02ae0a2b35d00d52 /web_src/js/features | |
parent | 5506cb92da56b7c4e69573dab5ae5b759ee57e75 (diff) | |
download | gitea-9837773f0e5267297e99b7267c9f19d23d63232d.tar.gz gitea-9837773f0e5267297e99b7267c9f19d23d63232d.zip |
Prevent showing webauthn error for every time visiting `/user/settings/security` (#18385)
Diffstat (limited to 'web_src/js/features')
-rw-r--r-- | web_src/js/features/user-auth-webauthn.js | 7 |
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(); }); } |