Skip to content

Commit

Permalink
fix(core): null check for verifying the authority of a user, fix #750 (
Browse files Browse the repository at this point in the history
  • Loading branch information
Shir0ha authored Jul 29, 2022
1 parent 7e67f15 commit a813947
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/command/validate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default function validate(ctx: Context) {
}

// check authority
if (session.user.authority) {
if (typeof session.user.authority === 'number') {
const authority = command.getConfig('authority', session)
if (authority > session.user.authority) {
return sendHint('internal.low-authority')
Expand Down

0 comments on commit a813947

Please sign in to comment.