[CP Staging] Fix missing optional chaining crash on Search page navigation#86462
Conversation
|
@ZhenjaHorbach Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
🚧 @luacmartins has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
…ch-optional-chaining [CP Staging] Fix missing optional chaining crash on Search page navigation (cherry picked from commit bd88d2d) (cherry-picked to staging by luacmartins)
|
🚀 Cherry-picked to staging by https://github.com/luacmartins in version: 9.3.49-1 🚀
Bundle Size Analysis (Sentry): |
|
Hi @JakubKorytko. CP is passed, comment |
|
🚀 Deployed to production by https://github.com/grgia in version: 9.3.49-2 🚀
|
|
🚀 Cherry-picked to staging by https://github.com/luacmartins in version: 9.3.50-0 🚀
Bundle Size Analysis (Sentry): |
|
I have failed to help you. I let you down and for that I am sorry. Please try again later. This may be due to a Claude outage (check here). Failure details: https://github.com/Expensify/Expensify/actions/runs/23647111726 |
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.3.50-8 🚀
|
Explanation of Change
Fix missing optional chaining on
searchResults?.search.isLoadinginsrc/components/Search/index.tsx. After PR #85629 removed theDeferredSearchwrapper, theSearchcomponent can now mount whilesearchResults.searchis stillundefined. The incomplete optional chain (?.search.isLoading) throws aTypeErrorinstead of short-circuiting. Changed to?.search?.isLoadingto match the pattern already used elsewhere in the file (e.g. line 470).Fixed Issues
$ #86454
PROPOSAL: N/A
Tests
TypeError: Cannot read properties of undefined (reading 'isLoading')errorOffline tests
N/A
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Web.mov