Skip to content

Commit 8769f75

Browse files
authored
Merge pull request #1309 from mathjax/update/node-init
Make node-main init() wait for the startup promise to resolve
2 parents 14f184f + 515f1d1 commit 8769f75

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

components/mjs/node-main/node-main.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ const init = (config = {}) => {
8282
combineConfig(MathJax.config, config);
8383
return Loader.load(...CONFIG.load)
8484
.then(() => CONFIG.ready())
85+
.then(() => MathJax.startup.promise) // Wait for MathJax to finish starting up
8586
.then(() => MathJax) // Pass MathJax global as argument to subsequent .then() calls
8687
.catch(error => CONFIG.failed(error));
8788
}

0 commit comments

Comments
 (0)