We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2a2bf13 commit a241c92Copy full SHA for a241c92
src/mixins/pagination.js
@@ -27,13 +27,13 @@ const makePageArray = (startNumber, numberOfPages) =>
27
28
// Sanitize the provided limit value (converting to a number)
29
const sanitizeLimit = val => {
30
- const limit = toInteger(val, 1)
+ const limit = toInteger(val) || 1
31
return limit < 1 ? DEFAULT_LIMIT : limit
32
}
33
34
// Sanitize the provided current page number (converting to a number)
35
const sanitizeCurrentPage = (val, numberOfPages) => {
36
- const page = toInteger(val, 1)
+ const page = toInteger(val) || 1
37
return page > numberOfPages ? numberOfPages : page < 1 ? 1 : page
38
39
0 commit comments