There was an error while loading. Please reload this page.
1 parent 5a4f8ac commit 458c782Copy full SHA for 458c782
1 file changed
src/index.ts
@@ -78,7 +78,7 @@ const calculatePagination = (
78
const indexType = config?.indexType ?? IndexType.ONE_BASED
79
const maxPages = config?.maxPages ?? 5
80
81
- const firstPage = indexType == IndexType.ZERO_BASED ? 0 : 1
+ const firstPage = indexType === IndexType.ZERO_BASED ? 0 : 1
82
const lastPage = Math.ceil(total / size) + (firstPage - 1)
83
const isCurrentTheFirstPage = page === firstPage
84
const isCurrentTheLastPage = page === lastPage
@@ -97,7 +97,7 @@ const calculatePagination = (
97
return {
98
indexNumber: visiblePage,
99
displayNumber:
100
- indexType == IndexType.ZERO_BASED ? visiblePage + 1 : visiblePage,
+ indexType === IndexType.ZERO_BASED ? visiblePage + 1 : visiblePage,
101
isCurrent: visiblePage === page,
102
}
103
0 commit comments