Skip to content

Commit

Permalink
Merge pull request #264 from mhchem/patch-1
Browse files Browse the repository at this point in the history
Better use of MathJax.typesetPromise()
  • Loading branch information
dpvc committed Sep 10, 2020
2 parents 8325e80 + 2cad92e commit a6bc78c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/typeset.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ calls. For example,
let promise = Promise.resolve(); // Used to hold chain of typesetting calls
function typeset(code) {
promise = promise.then(() => {code(); return MathJax.typesetPromise()})
promise = promise.then(() => {return MathJax.typesetPromise(code());})
.catch((err) => console.log('Typeset failed: ' + err.message));
return promise;
}
Expand Down

0 comments on commit a6bc78c

Please sign in to comment.