Skip to content

Commit

Permalink
Avoid empty string in in-lists array.
Browse files Browse the repository at this point in the history
  • Loading branch information
dpvc committed Jun 15, 2021
1 parent 124ab5f commit 049035e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ts/input/tex/ParseOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@ export default class ParseOptions {
// If the list is not just for its kind, record that it is in this list
// so that if it is copied, the copy can also be added to the list.
//
let lists = (NodeUtil.getProperty(node, 'in-lists') as string || '').split(',').concat(property).join(',');
const inlists = (NodeUtil.getProperty(node, 'in-lists') as string || '');
const lists = (inlists ? inlists.split(/,/) : []).concat(property).join(',');
NodeUtil.setProperty(node, 'in-lists', lists);
}
}
Expand Down

0 comments on commit 049035e

Please sign in to comment.