-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Attempt at fixing race #4416
Attempt at fixing race #4416
Conversation
src/libs/actions/PersonalDetails.js
Outdated
Onyx.connect({ | ||
key: ONYXKEYS.MY_PERSONAL_DETAILS, | ||
callback: (val) => { | ||
if (!val) { |
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.
Besides moving the block i also added this bit so that when we log out if this is null it just returns early since there is no reason to proceed with val is empty.
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.
There is one more thing, this should not run when the user is logged out. But it's fine you have null check on val
which should cover this case as well.
|
oh jest is failing. But its passing for me locally 🤔 Edit: Its failing for me locally as weird. Weird i could've sworn i ran |
Looks like I was able to resolve the problem with jest. I had to move the blocks back to authScreens since there were more race conditions occurring in jest causing it to fail. Atm having the code in authScreens with an early return seems like an easy fix so I think it's best to try it out first. |
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.
Looks good 👍
Luke seems to be offline and this is a deploy blocker. Self merging so that we can test if this resolves the blocker. |
Attempt at fixing race (cherry picked from commit 969f9d2)
🚀 Cherry-picked to staging in version: 1.0.82-4🚀
|
🚀 Deployed to production in version: 1.0.82-7🚀
|
🚀 Deployed to staging in version: 1.0.82-8🚀
|
🚀 Deployed to production by @francoisl in version: 1.0.83-1 🚀
|
cc @parasharrajat for some reason I cant add you as a reviewer.
Details
Fixed Issues
$ #4388 (comment)
Tests
const timezone = {automatic: true, selected: 'Asia/Kolkata'};
.Cannot read property 'replace' of undefined
during log out and log in.QA Steps
Steps mentioned in issue - #4388 (comment)
Tested On
Screenshots
Web
Mobile Web
Desktop
iOS
Android