Skip to content

Commit 41eac04

Browse files
authored
fix: remove Array.prototype.at calls (#545)
1 parent 7a7aa1e commit 41eac04

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Pagination.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -480,10 +480,11 @@ const Pagination: React.FC<PaginationProps> = (props) => {
480480
}
481481

482482
if (allPages - current >= pageBufferSize * 2 && current !== allPages - 2) {
483-
pagerList[pagerList.length - 1] = React.cloneElement(pagerList.at(-1), {
483+
const lastOne = pagerList[pagerList.length - 1];
484+
pagerList[pagerList.length - 1] = React.cloneElement(lastOne, {
484485
className: classNames(
485486
`${prefixCls}-item-before-jump-next`,
486-
pagerList.at(-1).props.className,
487+
lastOne.props.className,
487488
),
488489
});
489490

0 commit comments

Comments
 (0)