Skip to content

Commit

Permalink
fix remove new workspace option from FAB when user is in a workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
nkdengineer committed Nov 7, 2024
1 parent afa7b33 commit 5845a38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/actions/Policy/Policy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ function getInvoicePrimaryWorkspace(activePolicyID: OnyxEntry<string>, currentUs
*/
function hasActiveChatEnabledPolicies(policies: Array<OnyxEntry<PolicySelector>> | OnyxCollection<PolicySelector>, includeOnlyAdminPolicies = false): boolean {
const chatEnabledPolicies = Object.values(policies ?? {}).filter(
(policy) => policy?.isPolicyExpenseChatEnabled && (!includeOnlyAdminPolicies || policy.role === CONST.POLICY.ROLE.ADMIN),
(policy) => policy?.type !== CONST.POLICY.TYPE.PERSONAL && (!includeOnlyAdminPolicies || policy?.role === CONST.POLICY.ROLE.ADMIN),
);

if (chatEnabledPolicies.length === 0) {
Expand Down

0 comments on commit 5845a38

Please sign in to comment.