Skip to content

Commit 04c5aec

Browse files
committed
Catch errors from queueing Mathjax resetEquationNumbers call.
1 parent 5a3d7c6 commit 04c5aec

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

notebook/static/base/js/utils.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -940,12 +940,16 @@ define([
940940
if(!window.MathJax){
941941
return;
942942
}
943-
return $el.map(function(){
943+
$el.map(function(){
944944
// MathJax takes a DOM node: $.map makes `this` the context
945-
return MathJax.Hub.Queue(
946-
["Typeset", MathJax.Hub, this],
947-
["resetEquationNumbers",MathJax.InputJax.TeX]
948-
);
945+
MathJax.Hub.Queue(["Typeset", MathJax.Hub, this]);
946+
try {
947+
MathJax.Hub.Queue(
948+
["resetEquationNumbers", MathJax.InputJax.TeX]
949+
);
950+
} catch (e) {
951+
console.error("Error queueing resetEquationNumbers:", e);
952+
}
949953
});
950954
};
951955

0 commit comments

Comments
 (0)