-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Fixed Loading spinner on login form and crash after Login #3865
Conversation
@@ -169,9 +169,9 @@ function createOption(personalDetailList, report, draftComments, { | |||
}) { | |||
const hasMultipleParticipants = personalDetailList.length > 1; | |||
const personalDetail = personalDetailList[0]; | |||
const hasDraftComment = report | |||
const reportDraftComment = report |
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.
I don't get why changing this variable from boolean to object has anything to do with your fixing loading spinner? It looks like it's just used as a boolean below anyway. Can you explain?
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.
So There are two issues, I am trying to fix in this PR. Sometimes, the lodashGet(draftComments,
${ONYXKEYS.COLLECTION.REPORT_DRAFT_COMMENT}${report.reportID}, '')
returns null. So it will throw an error here that .length
is not present.
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.
Ah okay, i see. I didn't expect that value to be null (and hence not use the lodash get default value). Weird. Anyway, thanks for the fix 👍
@@ -297,13 +297,13 @@ function getOptions(reports, personalDetails, draftComments, activeReportID, { | |||
return; | |||
} | |||
|
|||
const hasDraftComment = report | |||
const reportDraftComment = report |
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.
Similar comment here. I don't get why this variable change is relevant to your PR.
Updated. Thanks |
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.
Changes LGTM
@@ -169,9 +169,9 @@ function createOption(personalDetailList, report, draftComments, { | |||
}) { | |||
const hasMultipleParticipants = personalDetailList.length > 1; | |||
const personalDetail = personalDetailList[0]; | |||
const hasDraftComment = report | |||
const reportDraftComment = report |
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.
Ah okay, i see. I didn't expect that value to be null (and hence not use the lodash get default value). Weird. Anyway, thanks for the fix 👍
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
@parasharrajat
|
@kidroca Thanks for notifying me. That's why I added the boolean conversion but couldn't think of it while review. I will patch this up in a small PR. |
Oh crap, nice catch @kidroca. I didn't consider the weirdness around empty string in JS wrt boolean operations. |
Unfortunately the deploy comments are not working right now. This was deployed to staging yesterday. |
Details
#3838 (comment)
#3838 (comment)
Fixed Issues
$ Fixes #3838
Tests | QA Steps
Tested On
Screenshots
Web
Mobile Web
Desktop
iOS
Android