Skip to content

Commit

Permalink
Clarify when this logic can be removed
Browse files Browse the repository at this point in the history
  • Loading branch information
Amal Nazeem committed Aug 17, 2021
1 parent fac742e commit fcbeadf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pages/workspace/WorkspaceSidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ const WorkspaceSidebar = ({
];

// After all the policies have loaded, we can know if the given policyID points to a nonexistant workspace
// allPolicies as a prop can be removed after Permissions.canUseFreePlan() is no longer needed and free plan is out of beta.
// When free plan is out of beta and Permissions.canUseFreePlan() gets removed,
// all code involving 'allPolicies' can be removed since policy loading will no longer be delayed on login.
if (allPolicies !== null && _.isEmpty(policy)) {
Growl.error(translate('workspace.error.growlMessageInvalidPolicy'), CONST.GROWL.DURATION_LONG);
Navigation.dismissModal();
Expand Down

0 comments on commit fcbeadf

Please sign in to comment.