fix(Role): throw TypeError in comparePositionTo (#3466)

This commit is contained in:
SpaceEEC
2019-09-10 15:44:49 +02:00
committed by Crawl
parent 4072ffb50d
commit 8e0f525d91

View File

@@ -150,7 +150,7 @@ class Role extends Base {
*/
comparePositionTo(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);
}