fix(flient): Moved the Mathjax config in SidePanel.js from constructor to componentDidMount.

This commit is contained in:
Kris Koishigawa
2019-01-19 10:56:01 +09:00
committed by Valeriy
parent 06158c2cac
commit c824ccb394

View File

@ -44,6 +44,9 @@ export class SidePanel extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.bindTopDiv = this.bindTopDiv.bind(this); this.bindTopDiv = this.bindTopDiv.bind(this);
}
componentDidMount() {
MathJax.Hub.Config({ MathJax.Hub.Config({
tex2jax: { tex2jax: {
inlineMath: [['$', '$'], ['\\(', '\\)']], inlineMath: [['$', '$'], ['\\(', '\\)']],
@ -51,9 +54,6 @@ export class SidePanel extends Component {
processClass: 'rosetta-code' processClass: 'rosetta-code'
} }
}); });
}
componentDidMount() {
MathJax.Hub.Queue([ MathJax.Hub.Queue([
'Typeset', 'Typeset',
MathJax.Hub, MathJax.Hub,