From 6c0d5dfea137e968a6d3fccdb555a561df023bd1 Mon Sep 17 00:00:00 2001 From: Linden <65407488+thelindat@users.noreply.github.com> Date: Sat, 27 Jul 2024 15:56:21 +1000 Subject: [PATCH] fix(server/player): await promise in hasAccountPermission Technically works anyway (returns and awaits the promise) but fixed for sanity/correctness. --- server/player/class.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/player/class.ts b/server/player/class.ts index cfb949ed..ed7dacce 100644 --- a/server/player/class.ts +++ b/server/player/class.ts @@ -197,7 +197,8 @@ export class OxPlayer extends ClassInterface { async hasAccountPermission(accountId: number, action: keyof OxAccountPermissions) { return ( - this.charId && CanPerformAction(this, accountId, (await GetAccountRole(accountId, this.charId)) || null, action) + this.charId && + (await CanPerformAction(this, accountId, (await GetAccountRole(accountId, this.charId)) || null, action)) ); }