-
Notifications
You must be signed in to change notification settings - Fork 3k
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
fix: crash when value is undefined
#7782
Conversation
Updating screens shortly.....testing more issues. |
I will update the IOS screen tomorrow. But I am pretty sure it is working. |
Could you please test it on IOS? I am getting a build error on IOS. I don't know what changed. |
Ok, App is built now but I am facing App freezing issue When I click setDefultmethod on the Payment Option Menu. On the other hand, I don't know how to test the complete VBA flow. I am stuck on the captcha step. Can someone please test IOS? Otherwise, this is ready. cc: @Beamanator |
Sorry, @parasharrajat I tried to verify this for you but I've had a lot of problems trying to verify this, none of which are related to the PR 😩 First I created some bank accounts with the generator script. Then I created an Expensify wallet. Next, I upgraded it to Gold. But I'm still not able to link a bank account to a wallet... All three of my accounts show that I'm using an invalid bank account when setting them as the default, but the error doesn't explain why. I modified the Auth code in order to give me the exact reason why, but now I'm getting 666 after updating and need to reprovision as updateRepos w/ build didn't work either. My last attempt will be to restart my machine, which I'll do after sending this. |
I was able to fix the App freezing issue and Test it and it is not crashing the app. I will attach the screen shotly. |
Sorry guys I'm pretty heads down in a design doc I didn't have time to test last weekend and may not have time today either :'( If @Julesssss is having many problems we can ping another engineer to help test |
I'll try testing this today |
Thanks, @nkuoch for your input. |
Alright, so this looks to solve our 3 deploy blocker issues. @nkuoch you said you've been testing this in relation to your own changes, which is great. Do you have time to review/merge this PR since the two assigned haven't had a chance to get to it so we can unblock the deploy? |
|
fix: crash when value is `undefined` (cherry picked from commit 8582db0)
🚀 Cherry-picked to staging by @nkuoch in version: 1.1.39-2 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
@@ -59,7 +59,8 @@ class BaseTextInput extends Component { | |||
|
|||
componentDidUpdate() { | |||
// Activate or deactivate the label when value is changed programmatically from outside | |||
if (this.value === this.props.value) { | |||
// Only update when value prop is provided | |||
if (this.props.value === undefined || this.value === this.props.value) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NAB _.isUndefined(this.props.value)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I will do that in #6584 during refactoring.
Details
ComponentDidUpdate
was allowing the undefined value to be pass down to native TextInput value which was causing an issue. So I added a check if that value prop isundefined
(~not provided), skip the update.Fixed Issues
$ #7769
$ #7774
$ #7775
$ #7869
Tests
QA Steps
Tested On
Screenshots
Web | Desktop
Mobile Web
iOS
Android