Skip to content

Commit 8735d2c

Browse files
lihaozeulivz
lihaoze
authored andcommitted
fix($plugin-pagination): won't work when perPagePosts is 1 and total posts is 2 (#1176)
1 parent d160e68 commit 8735d2c

File tree

1 file changed

+1
-1
lines changed
  • packages/@vuepress/plugin-pagination

1 file changed

+1
-1
lines changed

packages/@vuepress/plugin-pagination/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ function getIntervallers (max, interval) {
55
const arr = [...Array(count)]
66
return arr.map((v, index) => {
77
const start = index * interval
8-
const end = (index + 1) * interval - 1
8+
const end = (index + 1) * interval
99
return [start, end > max ? max : end]
1010
})
1111
}

0 commit comments

Comments
 (0)