Check if the policy contains only errors#35801
Conversation
| function hasGlobalWorkspaceSettingsRBR(policies: OnyxCollection<Policy>, policyMembers: OnyxCollection<PolicyMembers>) { | ||
| const cleanPolicies = Object.fromEntries(Object.entries(policies ?? {}).filter(([, policy]) => !!policy)); | ||
| // Check only valid policies | ||
| const cleanPolicies = Object.fromEntries(Object.entries(policies ?? {}).filter(([, policy]) => !!policy && policy.id)); |
There was a problem hiding this comment.
How about replacing !!policy && policy.id with policy?.id ?
BTW, could you please explain if this change is necessary to fix the issue. 😂
There was a problem hiding this comment.
@ntdiary Good point! I've added a more detailed explanation :D Could you please check this PR again?
Reviewer Checklist
Screenshots/VideosAndroid: Native35801-android-native.mp4Android: mWeb Chrome35801-android-chrome.mp4iOS: Native35801-ios-native.mp4iOS: mWeb Safari35801-ios-safari.mp4MacOS: Chrome / Safari35801-web.mp4MacOS: Desktop35801-desktop.mp4 |
|
@WojtekBoman, the final small thing, could you please add steps in |
The |
@WojtekBoman, my bad, I missed them 😅. I'm new to the Ideal Nav feature, so I don't know much about it. And when I tested it on the mobile web, I found that the navigation can only be switched back and forth between the not found page and the workspace list page. However, this may be a separate issue that is beyond the scope of this PR. :) 35801-ios-safari.mp4 |
|
@WojtekBoman could you link an issue on the OP? |
Issue has been already linked in the PR description. Is it sufficient or should I link it elsewhere? |
hayata-suenaga
left a comment
There was a problem hiding this comment.
non-blocking change requests to make comments more clear
|
🚀 Deployed to production by https://github.com/thienlnam in version: 1.4.41-12 🚀
|
Details
This PR fixes the crash when we go to Settings/Overview page of a workspace we don't have access to.
Fix:
Screen.Recording.2024-02-05.at.12.27.21.mov
Fixed Issues
$ #35631
PROPOSAL: N/A
Tests
Offline tests
N/A
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.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 so 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
The video presenting the fix is attached in the details section.
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop