Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit cd1e58c

Browse files
committed
_tJsx returns a React Object, the sub fn must return a React Object
not a string
1 parent 5cfec24 commit cd1e58c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/components/views/login/CaptchaForm.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ limitations under the License.
1717
'use strict';
1818

1919
import React from 'react';
20+
import ReactDOM from 'react-dom';
2021
import { _t, _tJsx } from '../../../languageHandler';
2122

2223
var DIV_ID = 'mx_recaptcha';
@@ -66,11 +67,10 @@ module.exports = React.createClass({
6667
// * jumping straight to a hosted captcha page (but we don't support that yet)
6768
// * embedding the captcha in an iframe (if that works)
6869
// * using a better captcha lib
69-
warning.innerHTML = _tJsx(
70-
"Robot check is currently unavailable on desktop - please use a <a>web browser</a>",
71-
/<a>(.*?)<\/a>/,
72-
(sub) => { return "<a href='https://riot.im/app'>{ sub }</a>"; }
73-
);
70+
ReactDOM.render(_tJsx(
71+
"Robot check is currently unavailable on desktop - please use a <a>web browser</a>",
72+
/<a>(.*?)<\/a>/,
73+
(sub) => { return <a href='https://riot.im/app'>{ sub }</a>; }), warning);
7474
this.refs.recaptchaContainer.appendChild(warning);
7575
}
7676
else {

0 commit comments

Comments
 (0)