Skip to content

Commit

Permalink
Move brackets
Browse files Browse the repository at this point in the history
  • Loading branch information
OskarDamkjaer committed May 10, 2021
1 parent 80b2b67 commit 61845a4
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/browser/modules/GuideCarousel/Pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,16 @@ export function paginationHelper(
*/
const lastIndex = itemCount - 1
const outOfBounds = selectedIndex < 0 || selectedIndex > lastIndex
if (outOfBounds) return []
if (outOfBounds) {
return []
}

const baseNumbers = range(0, itemCount)

// no split
if (itemCount <= 7) return baseNumbers
if (itemCount <= 7) {
return baseNumbers
}

// early splits
if (selectedIndex < 4) {
Expand Down

0 comments on commit 61845a4

Please sign in to comment.