Skip to content

Commit

Permalink
Safe-access policyID
Browse files Browse the repository at this point in the history
  • Loading branch information
roryabraham committed Oct 8, 2021
1 parent 8327635 commit cf625d1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/libs/actions/Policy.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,12 @@ function create(name = '', shouldAutomaticallyReroute = true) {
role: CONST.POLICY.ROLE.ADMIN,
});
}).then(() => {
const policyID = lodashGet(res, 'policyID');
if (shouldAutomaticallyReroute) {
Navigation.dismissModal();
Navigation.navigate(ROUTES.getWorkspaceCardRoute(res.policyID));
Navigation.navigate(ROUTES.getWorkspaceCardRoute(policyID));
}
return Promise.resolve(lodashGet(res, 'policyID'));
return Promise.resolve(policyID);
});
}

Expand Down

0 comments on commit cf625d1

Please sign in to comment.