Skip to content

Commit

Permalink
[fixed] issue grecaptcha.render is not a function by adding condition
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuaalpuerto authored and dozoisch committed May 10, 2018
1 parent c4eb862 commit b2ae438
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/recaptcha.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default class ReCAPTCHA extends React.Component {
}

explicitRender(cb) {
if (this.props.grecaptcha && this.state.widgetId === undefined) {
if (this.props.grecaptcha && this.props.grecaptcha.render && this.state.widgetId === undefined) {
const wrapper = document.createElement("div");
const id = this.props.grecaptcha.render(wrapper, {
sitekey: this.props.sitekey,
Expand Down

0 comments on commit b2ae438

Please sign in to comment.