Catch errors from queueing Mathjax resetEquationNumbers call.

This commit is contained in:
Thomas Kluyver 2017-08-22 10:53:12 +01:00
parent 5a3d7c63d0
commit 04c5aec072

View File

@ -940,12 +940,16 @@ define([
if(!window.MathJax){
return;
}
return $el.map(function(){
$el.map(function(){
// MathJax takes a DOM node: $.map makes `this` the context
return MathJax.Hub.Queue(
["Typeset", MathJax.Hub, this],
["resetEquationNumbers",MathJax.InputJax.TeX]
);
MathJax.Hub.Queue(["Typeset", MathJax.Hub, this]);
try {
MathJax.Hub.Queue(
["resetEquationNumbers", MathJax.InputJax.TeX]
);
} catch (e) {
console.error("Error queueing resetEquationNumbers:", e);
}
});
};