Skip to content

Commit

Permalink
fix: revert navDirFromPath behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
Atinux committed Mar 8, 2023
1 parent 908388b commit 049c356
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/composables/helpers.ts
Expand Up @@ -17,7 +17,7 @@ const navBottomLink = (link: NavItem): string | undefined => {
*/
const navDirFromPath = (path: string, tree: NavItem[]): NavItem[] | undefined => {
for (const file of tree) {
if (file._path === path && !file._id) { return tree }
if (file._path === path && !file._id) { return file.children }

if (file.children) {
const result = navDirFromPath(path, file.children)
Expand Down

0 comments on commit 049c356

Please sign in to comment.