We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 44be039 commit 882278dCopy full SHA for 882278d
components/dash-core-components/src/fragments/Math.react.js
@@ -1,6 +1,8 @@
1
import PropTypes from 'prop-types';
2
import React, {Component} from 'react';
3
4
+import lazyLoadMathJax from '../utils/LazyLoader/mathjax';
5
+
6
export default class DashMath extends Component {
7
constructor(props) {
8
super(props);
@@ -21,9 +23,10 @@ export default class DashMath extends Component {
21
23
}
22
24
25
renderMath() {
- if (window.MathJax?.typeset) {
- window.MathJax.typeset([this.span_element.current]);
26
- }
+ const current = this.span_element.current;
27
+ lazyLoadMathJax().then(function () {
28
+ window.MathJax.typeset([current]);
29
+ });
30
31
32
render() {
0 commit comments