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

[BUG] Handle division by 0 #129

Closed
mbpictures opened this issue Nov 8, 2024 · 2 comments · Fixed by #133
Closed

[BUG] Handle division by 0 #129

mbpictures opened this issue Nov 8, 2024 · 2 comments · Fixed by #133

Comments

@mbpictures
Copy link

Hi!

When the container of the Waveform Component has no width, the noOfSamples passed to the native is 0, and then the app crashes due to division by 0 error. It would offer a much better DX when you catch this case by e.g. don't render anything, when the width is 0 anyways, give the container a minimum width or at least make a Math.Max(noOfSampels, 1), so the app doesn't crash.

@t4dek
Copy link

t4dek commented Nov 8, 2024

came across the same issue, thx for raising @mbpictures

@kuldip-simform kuldip-simform linked a pull request Nov 13, 2024 that will close this issue
mukesh-simform added a commit that referenced this issue Nov 13, 2024
…sue-#129-Handle-division-by-0

fix(UNT-T30512): Issue #129 Handle division by 0
@kuldip-simform
Copy link
Contributor

We have released a new version 2.1.2. Please use that, and if the issue still persists, reopen or create a new issue.

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 a pull request may close this issue.

3 participants