Merge pull request #6505 from matrix-org/fix/release-grecaptcha-regression

Fix/release grecaptcha regression
This commit is contained in:
David Baker
2021-07-29 14:19:09 +01:00
committed by GitHub

View File

@@ -103,8 +103,8 @@ export default class CaptchaForm extends React.Component<ICaptchaFormProps, ICap
}
private resetRecaptcha() {
if (this.captchaWidgetId !== null) {
global.grecaptcha.reset(this.captchaWidgetId);
if (this.captchaWidgetId) {
global?.grecaptcha?.reset(this.captchaWidgetId);
}
}