Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: Blank screen after creating an account #2575
Fix: Blank screen after creating an account #2575
Changes from 15 commits
529f0fb
78490e7
8aeafcc
da36c16
c4d25f5
d6596c5
1591d76
f394b98
9faf5e4
fdc8259
d0a952f
bfdbb5f
c71967f
5c91d54
b20db83
a2aa335
6b224e1
6326456
3395cda
8bc3104
14df6cb
fa3eaa2
558babb
f0050f6
48f2427
13435af
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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've updated this so it can be reused in
fetchAllReports
and to guard againstnull
,undefined
asString(null)
would create a"null"
(similar situation for undefined and NaN)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.
Hmm, this is the one thing that I'm not so sure about. If we are calling this with a
reportID
that isnull
orundefined
why try to set it at all? Couldn't we just leave whatever existing value we have? Seems not ideal to fail silently and set thecurrentlyViewedReportID
to an empty string. Maybe it would be appropriate to log an alert of some kind when this happens instead?We have some ways to do that e.g.
https://github.com/Expensify/Expensify.cash/blob/f213be0a1be5a04599d2f17d8848b0a7824eb8be/src/libs/actions/Report.js#L717-L720
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.
As you can see the original logic would save anything without any consideration, I've just updated it so that if called with null or undefined they are converted
I'll just revert this, this will also address the used-before-defined problem
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.
Yes, I see. Only mentioning this since logging an alert would perhaps be useful. But no need to add it in this PR.