Skip to content

Commit 791e311

Browse files
authored
Merge pull request #1368 from mathjax/fix/cleanAttributes
Allow cleanAttributes to work on nodes with no attributes (e.g., XML nodes)
2 parents 0d3cbfd + 8505432 commit 791e311

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ts/input/tex/FilterUtil.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ const FilterUtil = {
181181
const node = arg.data.root;
182182
node.walkTree((mml: MmlNode, _d: any) => {
183183
const attribs = mml.attributes;
184+
if (!attribs) return;
184185
const keep = new Set(
185186
((attribs.get('mjx-keep-attrs') as string) || '').split(/ /)
186187
);

0 commit comments

Comments
 (0)