Skip to content

Commit 2435364

Browse files
committed
fix: don't show collection name as root
1 parent 6cbc861 commit 2435364

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

example/content/pages/index.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
title: Root
3+
---

src/NestedCollection.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,7 @@ const TreeNavLink = styled.div`
6868
`;
6969

7070
const getNodeTitle = (node) => {
71-
const title = node.isRoot
72-
? node.title
73-
: node.children.find((c) => !c.isDir && c.title)?.title || node.title;
71+
const title = node.children.find((c) => !c.isDir && c.title)?.title || node.title;
7472
return title;
7573
};
7674

0 commit comments

Comments
 (0)