Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent divide by zero errors in measurements #1058

Merged
merged 1 commit into from
Apr 8, 2024
Merged

Conversation

carbonrobot
Copy link
Contributor

@carbonrobot carbonrobot commented Apr 8, 2024

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

Copy link

changeset-bot bot commented Apr 8, 2024

🦋 Changeset detected

Latest commit: be52ed2

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

Copy link

vercel bot commented Apr 8, 2024

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

@carbonrobot carbonrobot merged commit 6893226 into main Apr 8, 2024
7 checks passed
@carbonrobot carbonrobot deleted the fix/div-zero branch April 8, 2024 21:27
@github-actions github-actions bot mentioned this pull request Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[8.0.0] RangeError: invalid array length
2 participants