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

Cannot read properties of undefined (reading 'toFixed') #617

Closed
rwilliamson1 opened this issue Jul 10, 2024 · 4 comments · Fixed by #621
Closed

Cannot read properties of undefined (reading 'toFixed') #617

rwilliamson1 opened this issue Jul 10, 2024 · 4 comments · Fixed by #621
Assignees
Labels
bug report Something isn't working

Comments

@rwilliamson1
Copy link

rwilliamson1 commented Jul 10, 2024

Environment

  • which version of react & react-native are you using?
  • react: 18.3.1
  • react-native: 0.74.2
  • react-native-web: 0.19.10

Description

When the slider is used with a step prop, when it is moved down to 0 it causes the error "Cannot read properties of undefined (reading 'toFixed')"


Screenshot 2024-07-10 at 2 09 58 PM

Reproducible Demo

The combination of using the step prop with the value going from a positive value down to 0 causes the error.


https://snack.expo.dev/jlLsyHnEs_ZzE3sODCTSB

@rwilliamson1 rwilliamson1 added the bug report Something isn't working label Jul 10, 2024
@tmizu23
Copy link

tmizu23 commented Jul 25, 2024

I'm experiencing the same issue. It was working fine up to v4.4.2. The problem started occurring after updating to v4.4.3.

@events-jonas-chrisw
Copy link

having the same problem here...

@events-jonas-chrisw
Copy link

events-jonas-chrisw commented Jul 29, 2024

Looks like this is the culprit (changing undefined to 0 stops the error) - Obviously any props.value of zero is false in the ternary:

image

@events-jonas-chrisw
Copy link

events-jonas-chrisw commented Sep 9, 2024

is this fixed - I still get an error when setting the slider to 0.
I have had to revert to 4.4.2

ah...hasn't been released yet.....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants