wcandillon / react-native-redash

The React Native Reanimated and Gesture Handler Toolbelt
https://wcandillon.gitbook.io/redash/
MIT License
1.98k stars 117 forks source link

Cannot read property 'c1' of undefined #525

Open Nehal-Zeller opened 3 months ago

Nehal-Zeller commented 3 months ago

I'm getting this intermittent crash in my project and can't seem to understand what could have caused this?

I'm using mixPath and getYForX functions but from the library, it seems the functions can't accept undefined or null values as parameter. export const interpolatePath = ( value: number, inputRange: number[], outputRange: Path[], extrapolate = Extrapolation.CLAMP ) => { "worklet"; ..... return serialize(path); export type Path = { move: Vector; curves: Curve[]; close: boolean; };

Both outputRange and curves don't accept null or undefined.

    "d3": "^7.9.0",
    "react-native-reanimated": "^3.8.1",
    "react-native-redash": "^18.1.3",
    "react-native-gesture-handler": "^2.15.0",
    "react-native": "0.73.6",
    "react": "18.2.0",
Screenshot 2024-07-01 at 10 34 27 PM

I can't seem to reproduce it but a lot of people are running into this issue so If anyone can help with any pointers, much appreciated. Thanks!

Nehal-Zeller commented 3 months ago

@wcandillon any help would be much appreciated, Thanks!