[X] I agree to follow this project's Code of Conduct
Code Sandbox link
No response
Bug report
After upgrading to 8.0.0 (and fixing breaking changes) loading the page now throws a "RangeError: invalid array length" on page load caused by a divide by zero.
Is there an existing issue for this?
Code of Conduct
Code Sandbox link
No response
Bug report
After upgrading to 8.0.0 (and fixing breaking changes) loading the page now throws a "RangeError: invalid array length" on page load caused by a divide by zero.
The exception is coming from this code:
https://github.com/FormidableLabs/nuka-carousel/blob/b8edcae5ebd135fe5f29a28a7c772235b5310074/packages/nuka/src/hooks/use-measurement.tsx#L11-L36
The argument
pageCount
is set toInfinity
, which coming from a divide by0
asvisibleWidth
is0
.This is mostly a race-condition during initialization.
The full stack trace (manually created as I have a dev hook intercepting the stack trace):