From 8735d2ca2818e49cc0811e7130b10cbf995eebc4 Mon Sep 17 00:00:00 2001 From: lihaoze Date: Wed, 16 Jan 2019 00:44:34 +0800 Subject: [PATCH] fix($plugin-pagination): won't work when perPagePosts is 1 and total posts is 2 (#1176) --- packages/@vuepress/plugin-pagination/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@vuepress/plugin-pagination/index.js b/packages/@vuepress/plugin-pagination/index.js index 8acd5acee0..ba27c01b88 100644 --- a/packages/@vuepress/plugin-pagination/index.js +++ b/packages/@vuepress/plugin-pagination/index.js @@ -5,7 +5,7 @@ function getIntervallers (max, interval) { const arr = [...Array(count)] return arr.map((v, index) => { const start = index * interval - const end = (index + 1) * interval - 1 + const end = (index + 1) * interval return [start, end > max ? max : end] }) }