Skip to content

Commit

Permalink
fix(transformer): stop unnecessary calls to list recursor on empty ne…
Browse files Browse the repository at this point in the history
…sted items array
  • Loading branch information
Luzefiru committed Mar 21, 2024
1 parent 1cfe2e2 commit e61534f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build/edjsHTML.browser.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/edjsHTML.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/edjsHTML.node.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/transforms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const transforms: transforms = {
if (!item.content && !item.items) return `<li>${item}</li>`;

let list = "";
if (item.items) list = recursor(item.items, listStyle);
if (item.items.length) list = recursor(item.items, listStyle);
if (item.content) return `<li> ${item.content} ${list} </li>`;
});

Expand Down

0 comments on commit e61534f

Please sign in to comment.