Skip to content

Commit 276b881

Browse files
committed
[fixed] issue with 0ids in 0.4.0
1 parent 5610c60 commit 276b881

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/recaptcha.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ const ReCAPTCHA = React.createClass({
2727
},
2828

2929
getValue() {
30-
if (this.props.grecaptcha && this.state.widgetId) {
30+
if (this.props.grecaptcha && this.state.widgetId !== undefined) {
3131
return this.props.grecaptcha.getResponse(this.state.widgetId);
3232
}
3333
return null;
3434
},
3535

3636
reset() {
37-
if (this.props.grecaptcha && this.state.widgetId) {
37+
if (this.props.grecaptcha && this.state.widgetId !== undefined) {
3838
this.props.grecaptcha.reset(this.state.widgetId);
3939
}
4040
},
@@ -48,7 +48,7 @@ const ReCAPTCHA = React.createClass({
4848
},
4949

5050
explicitRender(cb) {
51-
if (this.props.grecaptcha && !this.state.widgetId) {
51+
if (this.props.grecaptcha && this.state.widgetId === undefined) {
5252
this.captcha.getDOMNode();
5353
let id = this.props.grecaptcha.render(this.captcha.getDOMNode(), {
5454
sitekey: this.props.sitekey,

0 commit comments

Comments
 (0)