fix: typeset failed: Cannot read properties of undefined (#496)

This commit is contained in:
ayesha waris
2023-04-05 17:22:19 +05:00
committed by GitHub
parent c1478dbb41
commit 1ba5b938c4

View File

@@ -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;