Skip to content

Commit

Permalink
Fix error condition for policy create
Browse files Browse the repository at this point in the history
  • Loading branch information
Amal Nazeem committed Oct 6, 2021
1 parent 04083b1 commit 820b8cb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/libs/actions/Policy.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,10 @@ function create(name = '') {
role: CONST.POLICY.ROLE.ADMIN,
});
}).then(() => {
Navigation.dismissModal();
Navigation.navigate(ROUTES.getWorkspaceCardRoute(res.policyID));
if (res) {
Navigation.dismissModal();
Navigation.navigate(ROUTES.getWorkspaceCardRoute(res.policyID));
}
});
}

Expand Down

0 comments on commit 820b8cb

Please sign in to comment.