0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 20:42:43 +00:00

Remove page + 1 from ToC generator snippet

This commit is contained in:
G.Ambatte
2024-07-02 20:46:01 +12:00
parent 2cdd65b083
commit 7c60fbe655

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 : []
});
}