Skip to content

Commit

Permalink
fix: remove Array.prototype.at calls (#545)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoyo837 authored Dec 8, 2023
1 parent 7a7aa1e commit 41eac04
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -480,10 +480,11 @@ const Pagination: React.FC<PaginationProps> = (props) => {
}

if (allPages - current >= pageBufferSize * 2 && current !== allPages - 2) {
pagerList[pagerList.length - 1] = React.cloneElement(pagerList.at(-1), {
const lastOne = pagerList[pagerList.length - 1];
pagerList[pagerList.length - 1] = React.cloneElement(lastOne, {
className: classNames(
`${prefixCls}-item-before-jump-next`,
pagerList.at(-1).props.className,
lastOne.props.className,
),
});

Expand Down

0 comments on commit 41eac04

Please sign in to comment.