Skip to content

Commit 6a91063

Browse files
authored
Skip the navigation item if the parent group points to the same file (#707)
1 parent da90aa5 commit 6a91063

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Elastic.Markdown/Slices/Layout/_TocTreeNav.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
@foreach (var item in Model.SubTree.NavigationItems)
99
{
1010
var id = item.Id;
11-
if (item is FileNavigation file)
11+
if (item is FileNavigation file && Model.SubTree.Index?.FileName != file.File.FileName)
1212
{
1313
var f = file.File;
1414
<li class="flex group/li @(item.Depth == topLevelFile ? "font-semibold py-6 not-last:border-b-1 border-grey-20" : "ml-5 lg:ml-4 mt-4 lg:mt-3")">

0 commit comments

Comments
 (0)