diff --git a/src/auth/useRecaptcha.js b/src/auth/useRecaptcha.js index 0570d1b..c7dc4b4 100644 --- a/src/auth/useRecaptcha.js +++ b/src/auth/useRecaptcha.js @@ -52,6 +52,10 @@ export function useRecaptcha(sitekey) { }, [recaptchaId, sitekey]); const execute = useCallback(() => { + if (!sitekey) { + return Promise.resolve(null); + } + if (!window.grecaptcha) { return Promise.reject(new Error("Recaptcha not loaded")); }