Skip to content

Commit

Permalink
Merge pull request #48230 from Expensify/yuwen-openDraftRequestParams
Browse files Browse the repository at this point in the history
[No QA] Make sure we don't call openDraftWorkspaceRequest with bad policyIDs
  • Loading branch information
srikarparsi authored Aug 29, 2024
2 parents 6d70b10 + c803956 commit d918b8e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/libs/actions/Policy/Policy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2141,6 +2141,11 @@ function openWorkspaceInvitePage(policyID: string, clientMemberEmails: string[])
}

function openDraftWorkspaceRequest(policyID: string) {
if (policyID === '-1' || policyID === CONST.POLICY.ID_FAKE) {
Log.warn('openDraftWorkspaceRequest invalid params', {policyID});
return;
}

const params: OpenDraftWorkspaceRequestParams = {policyID};

API.read(READ_COMMANDS.OPEN_DRAFT_WORKSPACE_REQUEST, params);
Expand Down

0 comments on commit d918b8e

Please sign in to comment.