File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments