Skip to content

Commit 49fe92c

Browse files
committed
fix(core): type orphan list item set as Set<Element> for tsc strict check
1 parent 73e7a02 commit 49fe92c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/core/src/api/parsers/html/util/nestedLists.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function wrapOrphanListItems(element: HTMLElement) {
2020
const orphans = Array.from(element.querySelectorAll("li")).filter(
2121
(li) => li.closest("ul, ol") === null,
2222
);
23-
const orphanSet = new Set(orphans);
23+
const orphanSet: Set<Element> = new Set(orphans);
2424
const handled = new Set<Element>();
2525

2626
for (const orphan of orphans) {
@@ -32,7 +32,7 @@ function wrapOrphanListItems(element: HTMLElement) {
3232
handled.add(orphan);
3333

3434
let next = orphan.nextElementSibling;
35-
while (next && next.tagName === "LI" && orphanSet.has(next as HTMLElement)) {
35+
while (next && next.tagName === "LI" && orphanSet.has(next)) {
3636
group.push(next);
3737
handled.add(next);
3838
next = next.nextElementSibling;

0 commit comments

Comments
 (0)