mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
Fix constants errors not giving a stacktrace
This commit is contained in:
@@ -142,7 +142,7 @@ class ClientDataResolver {
|
||||
*/
|
||||
resolvePermission(permission) {
|
||||
if (typeof permission === 'string') permission = Constants.PermissionFlags[permission];
|
||||
if (!permission) throw Constants.Errors.NOT_A_PERMISSION;
|
||||
if (!permission) throw new Error(Constants.Errors.NOT_A_PERMISSION);
|
||||
return permission;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user