mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-04 03:52:40 +00:00
Remove page + 1 from ToC generator snippet
This commit is contained in:
@@ -8,14 +8,14 @@ const getTOC = (pages)=>{
|
|||||||
if(curDepth == targetDepth) {
|
if(curDepth == targetDepth) {
|
||||||
child.push({
|
child.push({
|
||||||
title : title,
|
title : title,
|
||||||
page : page + 1,
|
page : page,
|
||||||
children : []
|
children : []
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
if(child.length == 0) {
|
if(child.length == 0) {
|
||||||
child.push({
|
child.push({
|
||||||
title : null,
|
title : null,
|
||||||
page : page + 1,
|
page : page,
|
||||||
children : []
|
children : []
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user