Skip to content

Commit

Permalink
AP: Fix the back button on the Fallback Credentials step (#97039)
Browse files Browse the repository at this point in the history
* Fix the back button for Fallback Credentials step

* Remove duplicated back redirect
  • Loading branch information
valterlorran authored Dec 5, 2024
1 parent f392ac3 commit 0c61d33
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ const SiteMigrationApplicationPasswordsAuthorization: Step = function ( { naviga
);
}

const sourceDomain = new URL( source ).host;
const sourceDomain = new URL( source || '' ).host;

// translators: %(sourceDomain)s is the source domain that is being migrated.
const subHeaderText = translate(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,15 @@ const siteMigration: Flow = {
}

case STEPS.SITE_MIGRATION_FALLBACK_CREDENTIALS.slug: {
if (
urlQueryParams.get( 'backTo' ) ===
STEPS.SITE_MIGRATION_APPLICATION_PASSWORD_AUTHORIZATION.slug
) {
return navigate(
`${ STEPS.SITE_MIGRATION_APPLICATION_PASSWORD_AUTHORIZATION.slug }?${ urlQueryParams }`
);
}

return navigate( `${ STEPS.SITE_MIGRATION_CREDENTIALS.slug }?${ urlQueryParams }` );
}

Expand Down

0 comments on commit 0c61d33

Please sign in to comment.