Merge pull request #3603 from overleaf/msm-fix-react-mathjax-not-available

Ignored MathJax setup when not available

GitOrigin-RevId: 716af272070b15d3fa1c346bea611f0e1abbac33
This commit is contained in:
Miguel Serrano 2021-01-27 11:11:25 +01:00 committed by Copybot
parent 6135defdbe
commit 0d57ddfd23

View file

@ -6,6 +6,9 @@ function MessageContent({ content }) {
const root = useRef(null)
useEffect(() => {
if (!(window.MathJax && window.MathJax.Hub)) {
return
}
const MJHub = window.MathJax.Hub
const inlineMathConfig = MJHub.config && MJHub.config.tex2jax.inlineMath
const alreadyConfigured = inlineMathConfig.some(