Skip to content

Commit b2ae438

Browse files
joshuaalpuertodozoisch
authored andcommitted
[fixed] issue grecaptcha.render is not a function by adding condition
1 parent c4eb862 commit b2ae438

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
@@ -49,7 +49,7 @@ export default class ReCAPTCHA extends React.Component {
4949
}
5050

5151
explicitRender(cb) {
52-
if (this.props.grecaptcha && this.state.widgetId === undefined) {
52+
if (this.props.grecaptcha && this.props.grecaptcha.render && this.state.widgetId === undefined) {
5353
const wrapper = document.createElement("div");
5454
const id = this.props.grecaptcha.render(wrapper, {
5555
sitekey: this.props.sitekey,

0 commit comments

Comments
 (0)