fix: strict recaptcha checks (#5674)

This commit is contained in:
Piyush Gupta
2025-05-06 17:43:28 +05:30
committed by GitHub
parent 9a7d24ea4e
commit cf5bc51e94
2 changed files with 2 additions and 2 deletions

View File

@@ -51,7 +51,7 @@ export const SurveyInline = (props: Omit<SurveyContainerProps, "containerId">) =
const loadScript = async () => {
if (!window.formbricksSurveys) {
try {
if (props.isSpamProtectionEnabled) {
if (props.isSpamProtectionEnabled && props.recaptchaSiteKey) {
await loadRecaptchaScript(props.recaptchaSiteKey);
}
await loadSurveyScript();

View File

@@ -96,7 +96,7 @@ export const renderWidget = async (
return executeRecaptcha(recaptchaSiteKey);
};
if (isSpamProtectionEnabled) {
if (isSpamProtectionEnabled && recaptchaSiteKey) {
await loadRecaptchaScript(recaptchaSiteKey);
}