Skip to content

Commit

Permalink
fix: concatChar assignment logic (casdoor#595)
Browse files Browse the repository at this point in the history
Signed-off-by: Yixiang Zhao <[email protected]>
  • Loading branch information
seriouszyx authored Mar 20, 2022
1 parent 6bc4e64 commit 86b5d72
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion web/src/auth/AuthCallback.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class AuthCallback extends React.Component {
method: method,
};
const oAuthParams = Util.getOAuthGetParameters(innerParams);
const concatChar = oAuthParams?.redirectUri?.indexOf('?') === -1 ? '?' : '&';
const concatChar = oAuthParams?.redirectUri?.includes('?') ? '&' : '?';
AuthBackend.login(body, oAuthParams)
.then((res) => {
if (res.status === 'ok') {
Expand Down
2 changes: 1 addition & 1 deletion web/src/auth/LoginPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class LoginPage extends React.Component {
Setting.goToLink(link);
} else if (responseType === "code") {
const code = res.data;
const concatChar = oAuthParams?.redirectUri?.indexOf('?') === -1 ? '?' : '&';
const concatChar = oAuthParams?.redirectUri?.includes('?') ? '&' : '?';

if (Setting.hasPromptPage(application)) {
AuthBackend.getAccount("")
Expand Down

0 comments on commit 86b5d72

Please sign in to comment.