comparison s4-main.js @ 945:29342754a2d0 draft

Catch undefined error when MathJax not loaded
author HIROSE Yuuji <yuuji@gentei.org>
date Mon, 25 Oct 2021 23:25:56 +0900
parents 3891edb19b0b
children 420ad90116e6
comparison
equal deleted inserted replaced
944:3891edb19b0b 945:29342754a2d0
174 localntr.classList.remove("dissolving"); 174 localntr.classList.remove("dissolving");
175 localntr.classList.add("emerging"); 175 localntr.classList.add("emerging");
176 }, 100); 176 }, 100);
177 cnt++; 177 cnt++;
178 } 178 }
179 if (MathJax && MathJax.typesetPromise) { 179 try {
180 MathJax.typesetPromise(); // MathJax v3 180 if (MathJax && MathJax.typesetPromise) {
181 } 181 MathJax.typesetPromise(); // MathJax v3
182 }
183 } catch (err) {}
182 console.log("Update "+cnt+"rows"); 184 console.log("Update "+cnt+"rows");
183 if (cnt>0 && ntr.scrollIntoView) { 185 if (cnt>0 && ntr.scrollIntoView) {
184 let option = {behavior: "smooth"}; 186 let option = {behavior: "smooth"};
185 if (!isOlderJS) option.block = "center"; 187 if (!isOlderJS) option.block = "center";
186 try { // Scroll to last updated row 188 try { // Scroll to last updated row

yatex.org