yamankatby / react-native-material

Modular and customizable Material Design UI components for React Native
https://rn-material.js.org
MIT License
228 stars 38 forks source link

BUG: Crash when using pressEffect='ripple' #36

Closed sk185701 closed 2 years ago

sk185701 commented 2 years ago

It seems as though it's possible for the Pressable onPressOut function to be called before the setRipples in onPressIn takes effect, which results in the ripples array to empty and thus an attempt at animating an undefined value.

Associated log: ERROR TypeError: undefined is not an object (evaluating 'ripples[ripples.length - 1].style')

yamankatby commented 2 years ago

Hi @sk185701,

Thank you for reporting this issue and for the PR. Hopefully, I'll find time to merge it this week.