mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 02:53:31 +01:00
fix(PartialGroupDMChannel): Prevent undefined values (#10889)
fix(PartialGroupDMChannel): prevent `undefined` values Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
@@ -27,7 +27,7 @@ class PartialGroupDMChannel extends BaseChannel {
|
|||||||
* The hash of the channel icon
|
* The hash of the channel icon
|
||||||
* @type {?string}
|
* @type {?string}
|
||||||
*/
|
*/
|
||||||
this.icon = data.icon;
|
this.icon = data.icon ?? null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Recipient data received in a {@link PartialGroupDMChannel}.
|
* Recipient data received in a {@link PartialGroupDMChannel}.
|
||||||
@@ -39,7 +39,7 @@ class PartialGroupDMChannel extends BaseChannel {
|
|||||||
* The recipients of this Group DM Channel.
|
* The recipients of this Group DM Channel.
|
||||||
* @type {PartialRecipient[]}
|
* @type {PartialRecipient[]}
|
||||||
*/
|
*/
|
||||||
this.recipients = data.recipients;
|
this.recipients = data.recipients ?? [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A manager of the messages belonging to this channel
|
* A manager of the messages belonging to this channel
|
||||||
|
|||||||
Reference in New Issue
Block a user