Skip to content

Commit

Permalink
Check if rect array is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
davidjerleke committed Jan 17, 2023
1 parent 790e80e commit ed6e90f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/embla-carousel/src/components/SlideSizes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function SlideSizes(
readEdgeGap: boolean,
): SlideSizesType {
const { measureSize, startEdge, endEdge } = axis
const withEdgeGap = arrayLastIndex(slides) > 0 && readEdgeGap
const withEdgeGap = slideRects[0] && readEdgeGap
const startGap = measureStartGap()
const endGap = measureEndGap()
const slideSizes = slideRects.map(measureSize)
Expand Down

0 comments on commit ed6e90f

Please sign in to comment.