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

Update BaseInput.js #92

Merged
merged 1 commit into from
Feb 11, 2019
Merged

Update BaseInput.js #92

merged 1 commit into from
Feb 11, 2019

Conversation

Psiiirus
Copy link
Contributor

After Upgrading to 58.4 the Hoshi-Input crashed.
This was related to an uninitialized width state variable at Hoshi.js:116
I traced it down to the BaseInput.js state initialization and added an default number value of 0

<Animated.View
          style={[
            styles.border,
            {
              width: focusedAnim.interpolate({
                inputRange: [0, 1],
116:          outputRange: [0, >>>>width<<<<],
              }),
              backgroundColor: borderColor,
              height: borderHeight,
            },
          ]}
        />
      </View>

Fixed RN ~58 crash: [39,"RCTView",1,{"position":"absolute","bottom":0,"left":0,"right":0,"width":"<>","backgroundColor":436207616,"height":0.5}] is not usable as a native method argument

This error is located at:
in RCTView (at View.js:45)
in View (at createAnimatedComponent.js:153)
in AnimatedComponent (at Hoshi.js:110)
in RCTView (at View.js:45)
in View (at Hoshi.js:50)
...

Fixed RN ~58 crash: [39,"RCTView",1,{"position":"absolute","bottom":0,"left":0,"right":0,"width":"<<NaN>>","backgroundColor":436207616,"height":0.5}] is not usable as a native method argument
@halilb halilb merged commit cf41c96 into halilb:master Feb 11, 2019
@halilb
Copy link
Owner

halilb commented Feb 11, 2019

Thanks a lot @MM-Psiiirus!

@Psiiirus Psiiirus deleted the patch-2 branch February 11, 2019 11:13
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 this pull request may close these issues.

2 participants