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:
@ -91,7 +91,7 @@ class RoleEditPage extends React.Component {
|
||||
updateRoleField(key, value) {
|
||||
value = this.parseRoleField(key, value);
|
||||
|
||||
let role = this.state.role;
|
||||
const role = this.state.role;
|
||||
role[key] = value;
|
||||
this.setState({
|
||||
role: role,
|
||||
@ -179,7 +179,7 @@ class RoleEditPage extends React.Component {
|
||||
}
|
||||
|
||||
submitRoleEdit(willExist) {
|
||||
let role = Setting.deepCopy(this.state.role);
|
||||
const role = Setting.deepCopy(this.state.role);
|
||||
RoleBackend.updateRole(this.state.organizationName, this.state.roleName, role)
|
||||
.then((res) => {
|
||||
if (res.msg === "") {
|
||||
|
Reference in New Issue
Block a user