mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-15 09:13: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:
@ -116,7 +116,7 @@ class PermissionEditPage extends React.Component {
|
||||
updatePermissionField(key, value) {
|
||||
value = this.parsePermissionField(key, value);
|
||||
|
||||
let permission = this.state.permission;
|
||||
const permission = this.state.permission;
|
||||
permission[key] = value;
|
||||
this.setState({
|
||||
permission: permission,
|
||||
@ -288,7 +288,7 @@ class PermissionEditPage extends React.Component {
|
||||
}
|
||||
|
||||
submitPermissionEdit(willExist) {
|
||||
let permission = Setting.deepCopy(this.state.permission);
|
||||
const permission = Setting.deepCopy(this.state.permission);
|
||||
PermissionBackend.updatePermission(this.state.organizationName, this.state.permissionName, permission)
|
||||
.then((res) => {
|
||||
if (res.msg === "") {
|
||||
|
Reference in New Issue
Block a user