🌐 AI搜索 & 代理 主页
Skip to content

Commit a241c92

Browse files
committed
Update pagination.js
1 parent 2a2bf13 commit a241c92

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/mixins/pagination.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ const makePageArray = (startNumber, numberOfPages) =>
2727

2828
// Sanitize the provided limit value (converting to a number)
2929
const sanitizeLimit = val => {
30-
const limit = toInteger(val, 1)
30+
const limit = toInteger(val) || 1
3131
return limit < 1 ? DEFAULT_LIMIT : limit
3232
}
3333

3434
// Sanitize the provided current page number (converting to a number)
3535
const sanitizeCurrentPage = (val, numberOfPages) => {
36-
const page = toInteger(val, 1)
36+
const page = toInteger(val) || 1
3737
return page > numberOfPages ? numberOfPages : page < 1 ? 1 : page
3838
}
3939

0 commit comments

Comments
 (0)