_tJsx returns a React Object, the sub fn must return a React Object

not a string
pull/21833/head
Michael Telatynski 2017-08-26 08:18:07 +01:00
parent 5cfec247f0
commit cd1e58cb61
No known key found for this signature in database
GPG Key ID: 3F879DA5AD802A5E
1 changed files with 5 additions and 5 deletions

View File

@ -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 <a>web browser</a>",
/<a>(.*?)<\/a>/,
(sub) => { return "<a href='https://riot.im/app'>{ sub }</a>"; }
);
ReactDOM.render(_tJsx(
"Robot check is currently unavailable on desktop - please use a <a>web browser</a>",
/<a>(.*?)<\/a>/,
(sub) => { return <a href='https://riot.im/app'>{ sub }</a>; }), warning);
this.refs.recaptchaContainer.appendChild(warning);
}
else {