temp: fix tends to resolve increased script error (#492)

This commit is contained in:
ayesha waris
2023-04-04 12:09:49 +05:00
committed by GitHub
parent 1117ed0387
commit c16843fd4c

View File

@@ -24,7 +24,10 @@ function HTMLLoader({
function typeset(code) {
promise = promise.then(() => {
if (typeof window?.MathJax !== 'undefined') { return window.MathJax?.typesetPromise(code()); }
if (typeof window?.MathJax !== 'undefined') {
window.MathJax.typesetClear();
return window.MathJax?.typesetPromise(code());
}
return null;
})
.catch((err) => logError(`Typeset failed: ${err.message}`));