Null-guard the recaptcha setup
Fixes https://github.com/vector-im/riot-web/issues/11069pull/21833/head
							parent
							
								
									7d96517139
								
							
						
					
					
						commit
						082ebe636e
					
				|  | @ -190,14 +190,21 @@ export const RecaptchaAuthEntry = createReactClass({ | |||
|             return <Loader />; | ||||
|         } | ||||
| 
 | ||||
|         let errorText = this.props.errorText; | ||||
| 
 | ||||
|         const CaptchaForm = sdk.getComponent("views.auth.CaptchaForm"); | ||||
|         const sitePublicKey = this.props.stageParams.public_key; | ||||
|         let sitePublicKey; | ||||
|         if (!this.props.stageParams || !this.props.stageParams.public_key) { | ||||
|             errorText = _t("Missing captcha public key - check your server configuration"); | ||||
|         } else { | ||||
|             sitePublicKey = this.props.stageParams.public_key; | ||||
|         } | ||||
| 
 | ||||
|         let errorSection; | ||||
|         if (this.props.errorText) { | ||||
|         if (errorText) { | ||||
|             errorSection = ( | ||||
|                 <div className="error" role="alert"> | ||||
|                     { this.props.errorText } | ||||
|                     { errorText } | ||||
|                 </div> | ||||
|             ); | ||||
|         } | ||||
|  |  | |||
|  | @ -1478,6 +1478,7 @@ | |||
|     "You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use this app with an existing Matrix account on a different homeserver.": "You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use this app with an existing Matrix account on a different homeserver.", | ||||
|     "You can also set a custom identity server, but you won't be able to invite users by email address, or be invited by email address yourself.": "You can also set a custom identity server, but you won't be able to invite users by email address, or be invited by email address yourself.", | ||||
|     "To continue, please enter your password.": "To continue, please enter your password.", | ||||
|     "Missing captcha public key - check your server configuration": "Missing captcha public key - check your server configuration", | ||||
|     "Please review and accept all of the homeserver's policies": "Please review and accept all of the homeserver's policies", | ||||
|     "Please review and accept the policies of this homeserver:": "Please review and accept the policies of this homeserver:", | ||||
|     "An email has been sent to %(emailAddress)s": "An email has been sent to %(emailAddress)s", | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 Travis Ralston
						Travis Ralston