diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2022-01-25 08:11:49 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-25 00:11:49 +0000 |
commit | b68e605d56ef472de597e9a7c6df406ce97028c0 (patch) | |
tree | 38a3b086036550e518eb95f7adda037841fd0deb /web_src | |
parent | 42991dc89a7f3dadb7ad3b36d18b1a74628ec272 (diff) | |
download | gitea-b68e605d56ef472de597e9a7c6df406ce97028c0.tar.gz gitea-b68e605d56ef472de597e9a7c6df406ce97028c0.zip |
Prevent showing webauthn error for every time visiting `/user/settings/security` (#18385) (#18386)
Backport #18385
Diffstat (limited to 'web_src')
-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(); }); } |