Skip to content
This repository was archived by the owner on Nov 23, 2021. It is now read-only.

Commit 2659009

Browse files
authored
Update ditto.js
1 parent 09c8759 commit 2659009

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

ver/latest/ditto.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -395,9 +395,11 @@ $(function($) {
395395
$.get(path, function(data) {
396396
compile_into_dom(path, data, function() {
397397
// rerender mathjax and reset mathjax equation counter
398-
if (MathJax && MathJax.Extension["Tex/AMSmath"]) {
399-
MathJax.Extension["TeX/AMSmath"].startNumber = 0;
400-
MathJax.Extension["TeX/AMSmath"].labels = {};
398+
if (MathJax) {
399+
if (MathJax.Extension["Tex/AMSmath"]) {
400+
MathJax.Extension["TeX/AMSmath"].startNumber = 0;
401+
MathJax.Extension["TeX/AMSmath"].labels = {};
402+
}
401403

402404
var content = document.getElementById("content");
403405
MathJax.Hub.Queue(["Typeset", MathJax.Hub, content]);

0 commit comments

Comments
 (0)