Skip to content

Commit e61865a

Browse files
committed
Tidying
1 parent 100445d commit e61865a

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/helpers/nav-group-selected.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ module.exports = module.exports = (navGroup, {
88
if (navGroup === 'home') {
99
// FAKE value to signal that we instead check all the navgroups
1010
const navGroups = site.keys.navGroups
11-
// NB this must be called after nav-groups has already prepared the data (:scream:)
11+
// NB this relies on variable stored in site.keys, so must be called
12+
// *after* nav-groups has already prepared the data
1213
const possible = navGroups.filter((it) => selected(it, page))
1314
return possible.length === 1 && possible[0].title === 'Home'
1415
} else {

src/helpers/nav-groups.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ module.exports = ({
4848
}
4949

5050
navGroups._compiled = true
51-
console.log(navGroups)
5251

5352
site.keys.navGroups = navGroups
5453
return navGroups
@@ -69,9 +68,6 @@ function compileNavGroup (navGroup, componentNamesInGroup, contentCatalog, compo
6968
return latestVersionMap
7069
}, {})
7170
}
72-
// if ((navGroup.url === page?.url) || componentNamesInGroup.includes(page.component.name)) {
73-
// navGroup.selected = true
74-
// }
7571
return navGroup
7672
}
7773

0 commit comments

Comments
 (0)