Skip to content

Commit 106344c

Browse files
committed
Fix lint issue.
1 parent e2ac6c1 commit 106344c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • packages/ts-components/src/standard/pageToc

‎packages/ts-components/src/standard/pageToc/pageToc.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ function toPageTocItems(items: PageOutlineItem[]): PageTocItem[] {
114114
function omitSingleDocumentHeading(items: PageOutlineItem[]) {
115115
if (items.length !== 1) return items
116116
const [item] = items
117-
if (!item || item.depth !== 1) return items
117+
if (item?.depth !== 1) return items
118118
return item.children ?? []
119119
}
120120

0 commit comments

Comments
 (0)