1
1
mirror of https://github.com/go-gitea/gitea synced 2024-12-23 00:54:28 +00:00

Run detectWebAuthnSupport only on sign-in page (#31676)

Fix #31675, regression of #31504.
This commit is contained in:
Jason Song 2024-07-24 01:52:40 +08:00 committed by GitHub
parent 2f1cb1d289
commit bbd14769cd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5,6 +5,10 @@ import {GET, POST} from '../modules/fetch.ts';
const {appSubUrl} = window.config; const {appSubUrl} = window.config;
export async function initUserAuthWebAuthn() { export async function initUserAuthWebAuthn() {
if (!document.querySelector('.user.signin')) {
return;
}
if (!detectWebAuthnSupport()) { if (!detectWebAuthnSupport()) {
return; return;
} }