-
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
fix: prevent crash due to empty report #47997
fix: prevent crash due to empty report #47997
Conversation
Reviewer Checklist
Screenshots/VideosAndroid: Native47997.Android.mp4Android: mWeb Chrome47997.mWeb-Chrome.mp4iOS: Native47997.iOS.moviOS: mWeb Safari47997.mWeb-Safari.movMacOS: Chrome / Safari47997.Web.mp4MacOS: Desktop47997.Desktop.mp4 |
@@ -149,7 +149,7 @@ function ReportActionItemContentCreated({contextValue, parentReportAction, trans | |||
if (ReportUtils.isExpenseReport(report) || ReportUtils.isIOUReport(report) || ReportUtils.isInvoiceReport(report)) { | |||
return ( | |||
<OfflineWithFeedback pendingAction={action.pendingAction}> | |||
{transactionThreadReport && !isEmptyObject(transactionThreadReport) ? ( | |||
{!isEmptyObject(transactionThreadReport?.reportID) ? ( |
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.
It doesn't make sense to me we using isEmptyObject
to check a string.
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.
const isFromGlobalCreate = isEmptyObject(report?.reportID); |
@dominictb I think iOS is still showing the crash. Also, the result on a small screen briefly shows the not found page after deleting the expense. iOSSimulator.Screen.Recording.-.iPhone.15.Pro.17.2.-.2024-08-30.at.01.15.17.movmWeb - SafariSimulator.Screen.Recording.-.iPhone.15.Pro.17.2.-.2024-08-30.at.01.24.08.mov |
@mollfpr I have merged main
Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2024-08-30.at.09.29.03.mp4
Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2024-08-30.at.09.32.06.mp4 |
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.
LGTM!
The issue not found page shown briefly on the small screen still reproducible, but this is also happen on staging.
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/aldo-expensify in version: 9.0.37-0 🚀
|
🚀 Deployed to production by https://github.com/grgia in version: 9.0.38-4 🚀
|
Details
Fixed Issues
$ #46980
PROPOSAL: #46980 (comment)
Tests
Verify app is not crash
Offline tests
QA Steps
Verify app is not crash
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
compressed_android.webm.mp4
Android: mWeb Chrome
compressed_aweb.webm.mp4
iOS: Native
compressed_ios.mp4.mp4
iOS: mWeb Safari
compressed_iweb.mp4.mp4
MacOS: Chrome / Safari
compressed_web.mov.mp4
MacOS: Desktop
compressed_web.mov.mp4