0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-26 05:12:39 +00:00
Fix ToC generator snippet
This commit is contained in:
Trevor Buckner
2024-07-02 11:55:39 -04:00
committed by GitHub

View File

@@ -8,14 +8,14 @@ const getTOC = (pages)=>{
if(curDepth == targetDepth) {
child.push({
title : title,
page : page + 1,
page : page,
children : []
});
} else {
if(child.length == 0) {
child.push({
title : null,
page : page + 1,
page : page,
children : []
});
}