File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -48,8 +48,7 @@ export function TableOfContents({ignoreIds = []}: Props) {
4848 . filter ( Boolean ) as TreeNode [ ] ;
4949
5050 // Now group them together
51- // We only support 2 levels of nesting,
52- // where the first level is assumed to be headings, and the second one is assumed to be options
51+ // We only support 2 levels of nesting for now
5352 const _tocItems : TreeItem [ ] = [ ] ;
5453 let currentItem : TreeItem | undefined ;
5554 for ( let node of nodes ) {
@@ -70,7 +69,7 @@ export function TableOfContents({ignoreIds = []}: Props) {
7069 }
7170
7271 // Remove groups without children
73- setTreeItems ( _tocItems . filter ( item => item . children . length > 0 ) ) ;
72+ setTreeItems ( _tocItems ) ;
7473 } , [ ignoreIds ] ) ;
7574
7675 return (
You can’t perform that action at this time.
0 commit comments