mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge pull request #4020 from overleaf/jpa-gracefully-access-mathjax
[frontend] chat: gracefully access MathJax details GitOrigin-RevId: 5a68bf715a21c8b3881957afc7ac0ba83c353602
This commit is contained in:
parent
55f2a6e000
commit
2901de7830
1 changed files with 5 additions and 1 deletions
|
@ -10,7 +10,11 @@ function MessageContent({ content }) {
|
|||
return
|
||||
}
|
||||
const MJHub = window.MathJax.Hub
|
||||
const inlineMathConfig = MJHub.config && MJHub.config.tex2jax.inlineMath
|
||||
const inlineMathConfig =
|
||||
(MJHub.config &&
|
||||
MJHub.config.tex2jax &&
|
||||
MJHub.config.tex2jax.inlineMath) ||
|
||||
[]
|
||||
const alreadyConfigured = inlineMathConfig.some(
|
||||
c => c[0] === '$' && c[1] === '$'
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue