Skip to content
This repository has been archived by the owner on Apr 7, 2021. It is now read-only.

Commit

Permalink
Add a type validation on typeset function
Browse files Browse the repository at this point in the history
Before, the typeset function was called all the time, even when it
was not defined. Thus generating some alerts in the console.
Now, the function is called only when it exists.

See #9
  • Loading branch information
aledeg committed Jan 26, 2021
1 parent 05b29a5 commit b07bad8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion xExtension-LatexSupport/static/mathjax-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@ window.MathJax = {
};

document.body.addEventListener('freshrss:load-more', e => {
MathJax.typeset()
if ('function' === typeof MathJax.typeset) {
MathJax.typeset();
}
});

0 comments on commit b07bad8

Please sign in to comment.