Skip to content

Commit cf2d3a0

Browse files
committed
update comments
1 parent 2c79093 commit cf2d3a0

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

lib/page-data.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ module.exports = async function loadPageData () {
4343
const treePerVersion = {}
4444

4545
await Promise.all(versions.map(async (version) => {
46-
// Yes, we are mutating the rawTree object here.
46+
// Yes, we are mutating the rawTree object here...
4747
versionPages(rawTree[langCode])
4848

4949
// This step can't be asynchronous because the order of child pages matters.
@@ -58,8 +58,10 @@ module.exports = async function loadPageData () {
5858

5959
if (!item.childPages) return item
6060

61-
// Drop child pages that do not apply to the current version
61+
// Drop child pages that do not apply to the current version.
6262
item.childPages = item.childPages.filter(childPage => childPage.page.applicableVersions.includes(version))
63+
64+
// Run on the child pages recursively.
6365
item.childPages.forEach(childPage => versionPages(childPage))
6466
}
6567

0 commit comments

Comments
 (0)