diff --git a/services/web/frontend/js/features/chat/components/message-content.js b/services/web/frontend/js/features/chat/components/message-content.js index a5776cf1ee..7172a6b28b 100644 --- a/services/web/frontend/js/features/chat/components/message-content.js +++ b/services/web/frontend/js/features/chat/components/message-content.js @@ -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(