From 574d83cda17154c596b3e0cd2fbf5efbc01e023d Mon Sep 17 00:00:00 2001 From: Jason Song Date: Tue, 23 Jul 2024 16:15:35 +0800 Subject: [PATCH] fix: shortcut detectWebAuthnSupport --- web_src/js/features/user-auth-webauthn.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web_src/js/features/user-auth-webauthn.ts b/web_src/js/features/user-auth-webauthn.ts index 7b7508c4f1461..35c6aa8f7c30e 100644 --- a/web_src/js/features/user-auth-webauthn.ts +++ b/web_src/js/features/user-auth-webauthn.ts @@ -5,6 +5,10 @@ import {GET, POST} from '../modules/fetch.ts'; const {appSubUrl} = window.config; export async function initUserAuthWebAuthn() { + if (!document.querySelector('.user.signin')) { + return; + } + if (!detectWebAuthnSupport()) { return; }