Prevent showing webauthn error for every time visiting `/user/settings/security` (#18385) (#18386)

Backport #18385
This commit is contained in:
wxiaoguang 2022-01-25 08:11:49 +08:00 committed by GitHub
parent 42991dc89a
commit b68e605d56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 4 deletions

View File

@ -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();
});
}