Skip to content

Commit 9837773

Browse files
authored
Prevent showing webauthn error for every time visiting /user/settings/security (#18385)
1 parent 5506cb9 commit 9837773

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

web_src/js/features/user-auth-webauthn.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -150,13 +150,12 @@ export function initUserAuthWebAuthnRegister() {
150150
return;
151151
}
152152

153-
if (!detectWebAuthnSupport()) {
154-
return;
155-
}
156-
157153
$('#webauthn-error').modal({allowMultiple: false});
158154
$('#register-webauthn').on('click', (e) => {
159155
e.preventDefault();
156+
if (!detectWebAuthnSupport()) {
157+
return;
158+
}
160159
webAuthnRegisterRequest();
161160
});
162161
}

0 commit comments

Comments
 (0)