mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 00:53:31 +01:00
fix: don't patch set data with undefined (#6694)
This commit is contained in:
@@ -25,9 +25,9 @@ class BaseGuildEmoji extends Emoji {
|
||||
}
|
||||
|
||||
_patch(data) {
|
||||
if (data.name) this.name = data.name;
|
||||
if ('name' in data) this.name = data.name;
|
||||
|
||||
if (typeof data.require_colons !== 'undefined') {
|
||||
if ('require_colons' in data) {
|
||||
/**
|
||||
* Whether or not this emoji requires colons surrounding it
|
||||
* @type {?boolean}
|
||||
@@ -35,7 +35,7 @@ class BaseGuildEmoji extends Emoji {
|
||||
this.requiresColons = data.require_colons;
|
||||
}
|
||||
|
||||
if (typeof data.managed !== 'undefined') {
|
||||
if ('managed' in data) {
|
||||
/**
|
||||
* Whether this emoji is managed by an external service
|
||||
* @type {?boolean}
|
||||
@@ -43,7 +43,7 @@ class BaseGuildEmoji extends Emoji {
|
||||
this.managed = data.managed;
|
||||
}
|
||||
|
||||
if (typeof data.available !== 'undefined') {
|
||||
if ('available' in data) {
|
||||
/**
|
||||
* Whether this emoji is available
|
||||
* @type {?boolean}
|
||||
|
||||
Reference in New Issue
Block a user