mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 20:50:19 +08:00
chore(style): allow case declarations and ban var
(#987)
* chore(style): allow case declarations * chore(style): ban `var` and prefer `const`
This commit is contained in:
@ -182,7 +182,7 @@ class App extends Component {
|
||||
}
|
||||
|
||||
setLanguage(account) {
|
||||
let language = account?.language;
|
||||
const language = account?.language;
|
||||
if (language !== "" && language !== i18next.language) {
|
||||
Setting.setLanguage(language);
|
||||
}
|
||||
@ -242,7 +242,7 @@ class App extends Component {
|
||||
});
|
||||
|
||||
Setting.showMessage("success", "Logged out successfully");
|
||||
let redirectUri = res.data2;
|
||||
const redirectUri = res.data2;
|
||||
if (redirectUri !== null && redirectUri !== undefined && redirectUri !== "") {
|
||||
Setting.goToLink(redirectUri);
|
||||
} else if (owner !== "built-in") {
|
||||
@ -322,7 +322,7 @@ class App extends Component {
|
||||
}
|
||||
|
||||
renderAccount() {
|
||||
let res = [];
|
||||
const res = [];
|
||||
|
||||
if (this.state.account === undefined) {
|
||||
return null;
|
||||
@ -349,7 +349,7 @@ class App extends Component {
|
||||
}
|
||||
|
||||
renderMenu() {
|
||||
let res = [];
|
||||
const res = [];
|
||||
|
||||
if (this.state.account === null || this.state.account === undefined) {
|
||||
return [];
|
||||
|
Reference in New Issue
Block a user