Skip to content

Commit

Permalink
Fixes uncaught type error
Browse files Browse the repository at this point in the history
Math support will only be provided if the user has checked the
corresponding box in plugin settings. When no math support is required
the javascript snippet should be ignored.

Since only MathJax will be ignored and not MathJax.Hub, javascript will
raise a type error. This is fixed with a further condition.
  • Loading branch information
liaham committed Sep 15, 2023
1 parent eaefe78 commit f683a5d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions assets/javascripts/drawioEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,9 @@ window.onDrawioViewerLoad = function() {
GraphViewer.processElements();
// Make sure MathJax sees the SVG generated by te viewer
if(typeof(MathJax) !== 'undefined') {
if (typeof(MathJax.Hub) !== 'undefined') {
MathJax.Hub.Queue(["Typeset",MathJax.Hub]);
}
}
}

Expand Down

0 comments on commit f683a5d

Please sign in to comment.