diff --git a/components/mjs/node-main/node-main.js b/components/mjs/node-main/node-main.js index 1649d277d..a2ebf6333 100644 --- a/components/mjs/node-main/node-main.js +++ b/components/mjs/node-main/node-main.js @@ -82,6 +82,7 @@ const init = (config = {}) => { combineConfig(MathJax.config, config); return Loader.load(...CONFIG.load) .then(() => CONFIG.ready()) + .then(() => MathJax.startup.promise) // Wait for MathJax to finish starting up .then(() => MathJax) // Pass MathJax global as argument to subsequent .then() calls .catch(error => CONFIG.failed(error)); }