FormidableLabs / nuka-carousel

Small, fast, and accessibility-first React carousel library with an easily customizable UI and behavior to fit your brand and site.
https://commerce.nearform.com/open-source/nuka-carousel
Other
2.99k stars 594 forks source link

Prevent divide by zero errors in measurements #1058

Closed carbonrobot closed 2 months ago

carbonrobot commented 2 months ago

Prevent two types of divide by zero errors in measurements.

  1. When initialization of react components and the offsetWidth of the container is zero
  2. When the scrollDistance is set to a number <= 0

Fixes #1053

changeset-bot[bot] commented 2 months ago

🦋 Changeset detected

Latest commit: be52ed283797ecc65b1e61acd960e7fa609df07b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ------------- | ----- | | nuka-carousel | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

vercel[bot] commented 2 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nuka-carousel-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 8, 2024 9:19pm