Skip to content

Commit 049035e

Browse files
committed
Avoid empty string in in-lists array.
1 parent 124ab5f commit 049035e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ts/input/tex/ParseOptions.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,8 @@ export default class ParseOptions {
179179
// If the list is not just for its kind, record that it is in this list
180180
// so that if it is copied, the copy can also be added to the list.
181181
//
182-
let lists = (NodeUtil.getProperty(node, 'in-lists') as string || '').split(',').concat(property).join(',');
182+
const inlists = (NodeUtil.getProperty(node, 'in-lists') as string || '');
183+
const lists = (inlists ? inlists.split(/,/) : []).concat(property).join(',');
183184
NodeUtil.setProperty(node, 'in-lists', lists);
184185
}
185186
}

0 commit comments

Comments
 (0)