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

Fix grecaptcha regression
This commit is contained in:
Dariusz Niemczyk 2021-07-29 13:05:38 +02:00 committed by GitHub
commit f9f9aebef6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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);
}
}