Skip to content

Commit 34b1421

Browse files
authored
Merge pull request #1323 from mathjax/fix/registerTex
Fix `registerTex()` to handle `tex.packages` that is already an array
2 parents 70ff585 + c2675cf commit 34b1421

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

components/mjs/input/tex/register.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ export function registerTeX(packageList = [], tex = true) {
1212
let packages = MathJax.config.tex.packages;
1313
MathJax.config.tex.packages = packageList;
1414
if (packages) {
15+
if (Array.isArray(packages)) {
16+
packages = {'[+]': packages};
17+
}
1518
insert(MathJax.config.tex, {packages});
1619
}
1720
}

0 commit comments

Comments
 (0)