Skip to content

Commit 87550b6

Browse files
authored
Merge pull request #1 from Jobeso/fix-undefined-render-function
fixes crash related to undefined render function
2 parents 4bb6d93 + 861b7a3 commit 87550b6

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)