mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-18 21:43:50 +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:
@ -81,7 +81,7 @@ class PromptPage extends React.Component {
|
||||
updateUserField(key, value) {
|
||||
value = this.parseUserField(key, value);
|
||||
|
||||
let user = this.state.user;
|
||||
const user = this.state.user;
|
||||
user[key] = value;
|
||||
this.setState({
|
||||
user: user,
|
||||
@ -163,7 +163,7 @@ class PromptPage extends React.Component {
|
||||
}
|
||||
|
||||
submitUserEdit(isFinal) {
|
||||
let user = Setting.deepCopy(this.state.user);
|
||||
const user = Setting.deepCopy(this.state.user);
|
||||
UserBackend.updateUser(this.state.user.owner, this.state.user.name, user)
|
||||
.then((res) => {
|
||||
if (res.msg === "") {
|
||||
|
Reference in New Issue
Block a user