Skip to content

Commit 4b7f986

Browse files
Merge pull request #2 from claudiaps/set-onload-optional
Update Recaptcha.js
2 parents 57a14ef + 2e4850b commit 4b7f986

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Recaptcha.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,9 @@ const Recaptcha = forwardRef(
9393

9494
const handleLoad = useCallback(
9595
(...args) => {
96-
onLoad(...args);
96+
if(onLoad){
97+
onLoad(...args);
98+
}
9799
if (isInvisible) {
98100
$webView.current.injectJavaScript(`
99101
window.rnRecaptcha.execute();

0 commit comments

Comments
 (0)