Skip to content

Commit 8505432

Browse files
committed
Allow cleanAttributes to work on nodes with no attributes (e.g., XML nodes)
1 parent fe4921f commit 8505432

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
@@ -187,6 +187,7 @@ const FilterUtil = {
187187
const node = arg.data.root;
188188
node.walkTree((mml: MmlNode, _d: any) => {
189189
const attribs = mml.attributes;
190+
if (!attribs) return;
190191
const keep = new Set(
191192
((attribs.get('mjx-keep-attrs') as string) || '').split(/ /)
192193
);

0 commit comments

Comments
 (0)