1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-11 20:22:36 +03:00

Clear recaptcha error on reattempts

This commit is contained in:
Michael Telatynski
2020-11-11 14:00:40 +00:00
parent 0bee4bd72b
commit b3ccabbe6b

View File

@@ -102,6 +102,10 @@ export default class CaptchaForm extends React.Component {
console.log("Loaded recaptcha script."); console.log("Loaded recaptcha script.");
try { try {
this._renderRecaptcha(DIV_ID); this._renderRecaptcha(DIV_ID);
// clear error if re-rendered
this.setState({
errorText: null,
});
CountlyAnalytics.instance.track("onboarding_grecaptcha_loaded"); CountlyAnalytics.instance.track("onboarding_grecaptcha_loaded");
} catch (e) { } catch (e) {
this.setState({ this.setState({