[CP Staging + Prod] fix: Workspaces page crashing when Domain data is incomplete - #78113
Conversation
|
@ShridharGoel 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] |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
|
||
| return Object.values(allDomains).reduce<DomainItem[]>((domainItems, domain) => { | ||
| if (!domain) { | ||
| if (!domain || domain.accountID === undefined || !domain.email) { |
There was a problem hiding this comment.
I suppose domain.accountID as an empty line is also not a valid case
Or no?
There was a problem hiding this comment.
accountID should be a number and I assume 0 is not valid, but can't be sure, so I allow it here
There was a problem hiding this comment.
I think we should use !domain.accountID like we do at other places in the code. CONST.DEFAULT_NUMBER_ID is 0. Using domain.accountID === undefined would let a 0 slip through, which isn’t a valid ID.
There was a problem hiding this comment.
ok, thanks. changed domain.accountID === undefined to !domain.accountID
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariScreen.Recording.2025-12-19.at.4.42.14.PM.mov |
…rash-when-incomplete-domain [CP Staging + Prod] fix: Workspaces page crashing when Domain data is incomplete (cherry picked from commit bd763a9) (cherry-picked to staging by mountiny)
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
…rash-when-incomplete-domain [CP Staging + Prod] fix: Workspaces page crashing when Domain data is incomplete (cherry picked from commit bd763a9) (cherry-picked to production by mountiny)
|
🚀 Cherry-picked to staging by https://github.com/mountiny in version: 9.2.82-1 🚀
|
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 9.2.83-0 🚀
|
|
🚀 Cherry-picked to staging by https://github.com/mountiny in version: 9.2.84-0 🚀
|
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 9.2.84-8 🚀
|
|
🚀 Cherry-picked to staging by https://github.com/mountiny in version: 9.2.85-0 🚀
|
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.2.85-7 🚀
|
Explanation of Change
Skips domains that don't have accountID or email when creating rows for the Domains section. (These properties should normally be there, but sometimes backend sends a wrong object, this is a quick fix for the crash, not an eventual target solution).
Fixed Issues
$ #78013
PROPOSAL: N/A
Tests
Offline tests
N/A
QA Steps
Same as tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand 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
Nagranie.z.ekranu.2025-12-19.o.11.51.21.mov