Skip to content

Commit

Permalink
refactor(Role): move initialization of delete prop out of _patch (#6776)
Browse files Browse the repository at this point in the history
  • Loading branch information
iShibi committed Oct 7, 2021
1 parent 78124ae commit 872e7a5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/structures/Role.js
Expand Up @@ -32,6 +32,12 @@ class Role extends Base {
*/
this.unicodeEmoji = null;

/**
* Whether the role has been deleted
* @type {boolean}
*/
this.deleted = false;

if (data) this._patch(data);
}

Expand Down Expand Up @@ -97,12 +103,6 @@ class Role extends Base {
this.mentionable = data.mentionable;
}

/**
* Whether the role has been deleted
* @type {boolean}
*/
this.deleted = false;

if ('icon' in data) this.icon = data.icon;

if ('unicode_emoji' in data) this.unicodeEmoji = data.unicode_emoji;
Expand Down

0 comments on commit 872e7a5

Please sign in to comment.