From a888e491aec6ab90780488b16960cc18d8f78c80 Mon Sep 17 00:00:00 2001 From: fatchan Date: Mon, 9 Sep 2019 17:30:30 +0000 Subject: [PATCH] fix label for multibuild when its actually just single page --- helpers/build.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpers/build.js b/helpers/build.js index bb7d17d8..b24c0e20 100644 --- a/helpers/build.js +++ b/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;