Skip to content

Commit 458c782

Browse files
committed
Triple equals
1 parent 5a4f8ac commit 458c782

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ const calculatePagination = (
7878
const indexType = config?.indexType ?? IndexType.ONE_BASED
7979
const maxPages = config?.maxPages ?? 5
8080

81-
const firstPage = indexType == IndexType.ZERO_BASED ? 0 : 1
81+
const firstPage = indexType === IndexType.ZERO_BASED ? 0 : 1
8282
const lastPage = Math.ceil(total / size) + (firstPage - 1)
8383
const isCurrentTheFirstPage = page === firstPage
8484
const isCurrentTheLastPage = page === lastPage
@@ -97,7 +97,7 @@ const calculatePagination = (
9797
return {
9898
indexNumber: visiblePage,
9999
displayNumber:
100-
indexType == IndexType.ZERO_BASED ? visiblePage + 1 : visiblePage,
100+
indexType === IndexType.ZERO_BASED ? visiblePage + 1 : visiblePage,
101101
isCurrent: visiblePage === page,
102102
}
103103
}

0 commit comments

Comments
 (0)