Mercurial > hgrepos > hgweb.cgi > s4
changeset 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 |
files | s4-main.js |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/s4-main.js Mon Oct 25 23:14:53 2021 +0900 +++ b/s4-main.js Mon Oct 25 23:25:56 2021 +0900 @@ -176,9 +176,11 @@ }, 100); cnt++; } - if (MathJax && MathJax.typesetPromise) { - MathJax.typesetPromise(); // MathJax v3 - } + try { + if (MathJax && MathJax.typesetPromise) { + MathJax.typesetPromise(); // MathJax v3 + } + } catch (err) {} console.log("Update "+cnt+"rows"); if (cnt>0 && ntr.scrollIntoView) { let option = {behavior: "smooth"};