mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-06 17:41:44 +00:00
Read window.MathJax.Hub outside the timeout (#11431)
GitOrigin-RevId: 6a9f3cd2a7811059b7d1d95b411b37a41cb35b83
This commit is contained in:
parent
691438ee37
commit
adca4980db
1 changed files with 3 additions and 6 deletions
|
@ -19,14 +19,11 @@ const MessageContent: FC<{ content: string }> = ({ content }) => {
|
|||
|
||||
// MathJax v2 typesetting
|
||||
if (window.MathJax?.Hub) {
|
||||
const { Hub } = window.MathJax
|
||||
|
||||
const timeout = setTimeout(() => {
|
||||
configureMathJax()
|
||||
|
||||
window.MathJax.Hub.Queue([
|
||||
'Typeset',
|
||||
window.MathJax.Hub,
|
||||
root.current,
|
||||
])
|
||||
Hub.Queue(['Typeset', Hub, root.current])
|
||||
}, 0)
|
||||
|
||||
return () => clearTimeout(timeout)
|
||||
|
|
Loading…
Reference in a new issue