mirror of
https://github.com/danbulant/discord.js
synced 2026-07-09 13:10:42 +00:00
fix(Role): throw TypeError in comparePositionTo (#3466)
This commit is contained in:
parent
4072ffb50d
commit
8e0f525d91
1 changed files with 1 additions and 1 deletions
|
|
@ -150,7 +150,7 @@ class Role extends Base {
|
||||||
*/
|
*/
|
||||||
comparePositionTo(role) {
|
comparePositionTo(role) {
|
||||||
role = this.guild.roles.resolve(role);
|
role = this.guild.roles.resolve(role);
|
||||||
if (!role) return Promise.reject(new TypeError('INVALID_TYPE', 'role', 'Role nor a Snowflake'));
|
if (!role) throw new TypeError('INVALID_TYPE', 'role', 'Role nor a Snowflake');
|
||||||
return this.constructor.comparePositions(this, role);
|
return this.constructor.comparePositions(this, role);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue