Skip to content

Commit

Permalink
reversed the condition
Browse files Browse the repository at this point in the history
  • Loading branch information
FitseTLT committed Nov 1, 2024
1 parent 01068ae commit 48ec9d0
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,7 @@ function CodesStep({backTo}: CodesStepProps) {
}}
// When the 2FA code step is open from Xero flow, we don't need to pass backTo because we build the necessary root route
// from the backTo param in the route (in getMatchingRootRouteForRHPRoute) and goBack will not need a fallbackRoute.
onBackButtonPress={() =>
TwoFactorAuthActions.quitAndNavigateBack(route?.params?.forwardTo && !route.params.forwardTo?.includes(READ_COMMANDS.CONNECT_POLICY_TO_XERO) ? backTo : '')
}
onBackButtonPress={() => TwoFactorAuthActions.quitAndNavigateBack(route.params.forwardTo?.includes(READ_COMMANDS.CONNECT_POLICY_TO_XERO) ? '' : backTo)}
>
<ScrollView contentContainerStyle={styles.flexGrow1}>
{!!isUserValidated && (
Expand Down

0 comments on commit 48ec9d0

Please sign in to comment.