Skip to content

Commit

Permalink
fix: workspace name not shown in invoice preview
Browse files Browse the repository at this point in the history
  • Loading branch information
daledah committed Jul 18, 2024
1 parent f392cd3 commit 7fb57fe
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 @@ -187,7 +187,7 @@ function getPolicy(policyID: string | undefined): OnyxEntry<Policy> {
*/
function getPrimaryPolicy(activePolicyID?: OnyxEntry<string>): Policy | undefined {
const activeAdminWorkspaces = PolicyUtils.getActiveAdminWorkspaces(allPolicies);
const primaryPolicy: Policy | null | undefined = allPolicies?.[activePolicyID ?? '-1'];
const primaryPolicy: Policy | null | undefined = allPolicies?.[`${ONYXKEYS.COLLECTION.POLICY}${activePolicyID ?? '-1'}`];

return primaryPolicy ?? activeAdminWorkspaces[0];
}
Expand Down

0 comments on commit 7fb57fe

Please sign in to comment.