Skip to content

Commit 1d4294b

Browse files
bpas247taion
andauthored
fix(carousel): prevent intervals from being 0
Prevents individual intervals from being `0`, preventing end-users to specify instant auto-play transitions from occurring per-interval Co-authored-by: Jimmy Jia <[email protected]>
1 parent c1c72e0 commit 1d4294b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Carousel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ function CarouselFunc(uncontrolledProps: CarouselProps, ref) {
505505

506506
intervalHandleRef.current = window.setInterval(
507507
document.visibilityState ? nextWhenVisible : next,
508-
activeChildIntervalRef.current || interval || undefined,
508+
activeChildIntervalRef.current ?? interval ?? undefined,
509509
);
510510

511511
return () => {

0 commit comments

Comments
 (0)