fix label for multibuild when its actually just single page

merge-requests/208/head
fatchan 5 years ago
parent 5f455831a4
commit a888e491ae
  1. 2
      helpers/build.js

@ -93,7 +93,7 @@ module.exports = {
}
const difference = options.endpage-options.startpage + 1; //+1 because for single pagemust be > 0
const threads = await Posts.getRecent(options.board._id, options.startpage, difference*10);
const label = `/${options.board._id}/${options.startpage === 1 ? 'index' : options.startpage}.html => /${options.board._id}/${options.endpage === 1 ? 'index' : options.endpage}.html`;
const label = `/${options.board._id}/${options.startpage === 1 ? 'index' : options.startpage}${options.endpage === options.startpage ? '' : options.endpage === 1 ? 'index' : options.endpage}.html`;
const buildArray = [];
for (let i = options.startpage; i <= options.endpage; i++) {
let spliceStart = (i-1)*10;

Loading…
Cancel
Save