@captchafox/react
Advanced tools
Comparing version
@@ -113,16 +113,16 @@ "use client"; | ||
if (firstRendered.current) { | ||
if (!isApiReady()) { | ||
return; | ||
if (isApiReady()) { | ||
renderCaptcha(); | ||
} | ||
renderCaptcha(); | ||
} else { | ||
loadCaptchaScript().then(() => __async(void 0, null, function* () { | ||
if (isApiReady()) { | ||
firstRendered.current = true; | ||
yield renderCaptcha(); | ||
} | ||
})).catch((err) => { | ||
onError == null ? void 0 : onError(err); | ||
console.error("[CaptchaFox] Could not load script:", err); | ||
}); | ||
} | ||
loadCaptchaScript().then(() => __async(void 0, null, function* () { | ||
if (isApiReady()) { | ||
firstRendered.current = true; | ||
yield renderCaptcha(); | ||
} | ||
})).catch((err) => { | ||
onError == null ? void 0 : onError(err); | ||
console.error("[CaptchaFox] Could not load script:", err); | ||
}); | ||
}, [containerRef, sitekey, lang, mode]); | ||
@@ -129,0 +129,0 @@ return /* @__PURE__ */ React.createElement("div", { ref: setContainerRef, id: widgetId, className }); |
{ | ||
"name": "@captchafox/react", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"main": "./dist/index.cjs", | ||
@@ -5,0 +5,0 @@ "module": "./dist/index.js", |
Sorry, the diff of this file is not supported yet
17254
0.19%