From cd1e58cb618f30fa3449ebb90b471baeafb9f2c6 Mon Sep 17 00:00:00 2001
From: Michael Telatynski <7t3chguy@gmail.com>
Date: Sat, 26 Aug 2017 08:18:07 +0100
Subject: [PATCH] _tJsx returns a React Object, the sub fn must return a React
Object not a string
---
src/components/views/login/CaptchaForm.js | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/components/views/login/CaptchaForm.js b/src/components/views/login/CaptchaForm.js
index 8f9c0391ae..d24990f94d 100644
--- a/src/components/views/login/CaptchaForm.js
+++ b/src/components/views/login/CaptchaForm.js
@@ -17,6 +17,7 @@ limitations under the License.
'use strict';
import React from 'react';
+import ReactDOM from 'react-dom';
import { _t, _tJsx } from '../../../languageHandler';
var DIV_ID = 'mx_recaptcha';
@@ -66,11 +67,10 @@ module.exports = React.createClass({
// * jumping straight to a hosted captcha page (but we don't support that yet)
// * embedding the captcha in an iframe (if that works)
// * using a better captcha lib
- warning.innerHTML = _tJsx(
- "Robot check is currently unavailable on desktop - please use a web browser",
- /(.*?)<\/a>/,
- (sub) => { return "{ sub }"; }
- );
+ ReactDOM.render(_tJsx(
+ "Robot check is currently unavailable on desktop - please use a web browser",
+ /(.*?)<\/a>/,
+ (sub) => { return { sub }; }), warning);
this.refs.recaptchaContainer.appendChild(warning);
}
else {