Skip to content

Commit 861b7a3

Browse files
authored
fixes crash related to undefined render function
1 parent 4bb6d93 commit 861b7a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ReCaptcha.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class ReCaptcha extends Component {
3232
theme: PropTypes.oneOf(["dark", "light"])
3333
};
3434
isReady = () =>
35-
typeof window !== "undefined" && typeof window.grecaptcha !== "undefined";
35+
typeof window !== "undefined" && typeof window.grecaptcha !== "undefined" && typeof window.grecaptcha.render === 'function';
3636

3737
readyIntervalId = setInterval(() => this._updateReadyState(), 1000);
3838
recaptcha = createRef();

0 commit comments

Comments
 (0)