fix: Remove try/catch statements without error argument (#6370)

This commit is contained in:
Tom Moor
2024-01-10 08:02:44 -08:00
committed by GitHub
parent 870c623601
commit 22c52f84c5
5 changed files with 8 additions and 8 deletions

View File

@@ -93,7 +93,7 @@ export default class UsersStore extends Store<User> {
try {
this.updateCounts(UserRole.Admin, user.role);
await this.actionOnUser("promote", user);
} catch {
} catch (_e) {
this.updateCounts(user.role, UserRole.Admin);
}
};
@@ -103,7 +103,7 @@ export default class UsersStore extends Store<User> {
try {
this.updateCounts(to, user.role);
await this.actionOnUser("demote", user, to);
} catch {
} catch (_e) {
this.updateCounts(user.role, to);
}
};
@@ -114,7 +114,7 @@ export default class UsersStore extends Store<User> {
this.counts.suspended += 1;
this.counts.active -= 1;
await this.actionOnUser("suspend", user);
} catch {
} catch (_e) {
this.counts.suspended -= 1;
this.counts.active += 1;
}
@@ -126,7 +126,7 @@ export default class UsersStore extends Store<User> {
this.counts.suspended -= 1;
this.counts.active += 1;
await this.actionOnUser("activate", user);
} catch {
} catch (_e) {
this.counts.suspended += 1;
this.counts.active -= 1;
}