diff --git a/packages/frontend/src/components/accounts/auto_import/AutoImportWrapper.js b/packages/frontend/src/components/accounts/auto_import/AutoImportWrapper.js index 8c4f240f82..06ab85960f 100644 --- a/packages/frontend/src/components/accounts/auto_import/AutoImportWrapper.js +++ b/packages/frontend/src/components/accounts/auto_import/AutoImportWrapper.js @@ -52,7 +52,7 @@ export function AutoImportWrapper({ }; const redirectToFailureUrl = () => { - if (isUrlNotJavascriptProtocol(window.location.href)) { + if (isUrlNotJavascriptProtocol(failureUrl)) { window.location.href = failureUrl; } }; @@ -65,4 +65,4 @@ export function AutoImportWrapper({ onCancel={failureUrl && redirectToFailureUrl} /> ); -} \ No newline at end of file +}