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:
q1anx1
2022-08-08 23:35:24 +08:00
committed by GitHub
parent 802995ed16
commit deed857788
65 changed files with 187 additions and 182 deletions

View File

@ -52,7 +52,7 @@ class TokenEditPage extends React.Component {
updateTokenField(key, value) {
value = this.parseTokenField(key, value);
let token = this.state.token;
const token = this.state.token;
token[key] = value;
this.setState({
token: token,
@ -164,7 +164,7 @@ class TokenEditPage extends React.Component {
}
submitTokenEdit(willExist) {
let token = Setting.deepCopy(this.state.token);
const token = Setting.deepCopy(this.state.token);
TokenBackend.updateToken(this.state.token.owner, this.state.tokenName, token)
.then((res) => {
if (res.msg === "") {