Skip to content

Commit dd14fa7

Browse files
author
haitaoo
committed
fix(navigateToLogin): navigateToLogin only jumps to the internal login page
1 parent adc7508 commit dd14fa7

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

ui/src/utils/floppyNavigation.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,9 @@ const navigate = (to: string | number, config: NavigateConfig = {}) => {
6060
/**
6161
* 1. Blocking redirection of two login pages
6262
* 2. Auto storage login redirect
63+
* Note: The or judgement cannot be missing here, both jumps will be used
6364
*/
6465
if (to === RouteAlias.login || to === getLoginUrl()) {
65-
if (equalToCurrentHref(to)) {
66-
return;
67-
}
6866
storageLoginRedirect();
6967
}
7068

@@ -88,10 +86,11 @@ const navigate = (to: string | number, config: NavigateConfig = {}) => {
8886
};
8987

9088
/**
91-
* auto navigate to login page with redirect info
89+
* auto navigate to login page
90+
* Note: Only the internal login page is jumped here, `userAgent` login is handled on the internal login page.
9291
*/
9392
const navigateToLogin = (config?: NavigateConfig) => {
94-
const loginUrl = getLoginUrl();
93+
const loginUrl = RouteAlias.login;
9594
navigate(loginUrl, config);
9695
};
9796

0 commit comments

Comments
 (0)