We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6e5bc66 commit 8bdeb09Copy full SHA for 8bdeb09
packages/@vuepress/plugin-pagination/index.js
@@ -1,8 +1,8 @@
1
const { path } = require('@vuepress/shared-utils')
2
3
function getIntervallers (max, interval) {
4
- const count = Math.floor(max / interval)
5
- const arr = [...Array(count + 1)]
+ const count = max % interval === 0 ? Math.floor(max / interval) : Math.floor(max / interval) + 1
+ const arr = [...Array(count)]
6
return arr.map((v, index) => {
7
const start = index * interval
8
const end = (index + 1) * interval - 1
0 commit comments