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 |
| return ( | ||
| <OfflineWithFeedback pendingAction={action.pendingAction}> | ||
| {transactionThreadReport && !isEmptyObject(transactionThreadReport) ? ( | ||
| {!isEmptyObject(transactionThreadReport?.reportID) ? ( |
There was a problem hiding this comment.
It doesn't make sense to me we using isEmptyObject to check a string.
There was a problem hiding this comment.
|
@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 |
mollfpr
left a comment
There was a problem hiding this comment.
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 Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.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