Skip to content

Commit

Permalink
fix remove shouldContainPendingDeleteOption
Browse files Browse the repository at this point in the history
  • Loading branch information
tienifr committed Apr 3, 2024
1 parent 6b05057 commit a45c9a9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/libs/OptionsListUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -826,8 +826,8 @@ function getSearchValueForPhoneOrEmail(searchTerm: string) {
/**
* Verifies that there is at least one enabled option
*/
function hasEnabledOptions(options: PolicyCategories | PolicyTag[], shouldContainPendingDeleteOption = true): boolean {
return Object.values(options).some((option) => option.enabled && (shouldContainPendingDeleteOption || option.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE));
function hasEnabledOptions(options: PolicyCategories | PolicyTag[]): boolean {
return Object.values(options).some((option) => option.enabled && option.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function WorkspaceCategoriesSettingsPage({route, policyCategories}: WorkspaceCat
setWorkspaceRequiresCategory(route.params.policyID, value);
};

const hasEnabledOptions = OptionsListUtils.hasEnabledOptions(policyCategories ?? {}, false);
const hasEnabledOptions = OptionsListUtils.hasEnabledOptions(policyCategories ?? {});
return (
<AdminPolicyAccessOrNotFoundWrapper policyID={route.params.policyID}>
<PaidPolicyAccessOrNotFoundWrapper policyID={route.params.policyID}>
Expand Down

0 comments on commit a45c9a9

Please sign in to comment.