From 567e9b8d9f256c9dacbe1f0d549343fb9ae42e27 Mon Sep 17 00:00:00 2001 From: Amit Singh Date: Sun, 21 Sep 2025 18:29:21 +0530 Subject: [PATCH] Fix renderPasswordlessCaptcha check in render function to handle undefined challenge --- src/web-auth/captcha.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/web-auth/captcha.js b/src/web-auth/captcha.js index 4cb9b155..e0a031bc 100644 --- a/src/web-auth/captcha.js +++ b/src/web-auth/captcha.js @@ -397,7 +397,7 @@ function render(auth0Client, flow, element, options, callback) { element.innerHTML = options.templates.error(err); return done(err); } - if (!challenge.required) { + if (!challenge || !challenge.required) { element.style.display = 'none'; element.innerHTML = ''; return done();