From 1ba5b938c48603ea1b2a16e69639eb650327a9aa Mon Sep 17 00:00:00 2001 From: ayesha waris <73840786+ayeshoali@users.noreply.github.com> Date: Wed, 5 Apr 2023 17:22:19 +0500 Subject: [PATCH] fix: typeset failed: Cannot read properties of undefined (#496) --- src/components/HTMLLoader.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/HTMLLoader.jsx b/src/components/HTMLLoader.jsx index 8fcffbe0..c8cd38df 100644 --- a/src/components/HTMLLoader.jsx +++ b/src/components/HTMLLoader.jsx @@ -24,7 +24,7 @@ function HTMLLoader({ function typeset(code) { promise = promise.then(() => { - if (typeof window?.MathJax !== 'undefined') { + if (typeof window?.MathJax !== 'undefined' && typeof window?.MathJax.startup !== 'undefined') { window.MathJax.startup.defaultPageReady().then((window.MathJax?.typesetPromise(code()))); } return null;