Skip to content

Commit 320e3a6

Browse files
fix(PartialGroupDMChannel): Prevent undefined values (#10889)
fix(PartialGroupDMChannel): prevent `undefined` values Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
1 parent 026440c commit 320e3a6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/discord.js/src/structures/PartialGroupDMChannel.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class PartialGroupDMChannel extends BaseChannel {
2727
* The hash of the channel icon
2828
* @type {?string}
2929
*/
30-
this.icon = data.icon;
30+
this.icon = data.icon ?? null;
3131

3232
/**
3333
* Recipient data received in a {@link PartialGroupDMChannel}.
@@ -39,7 +39,7 @@ class PartialGroupDMChannel extends BaseChannel {
3939
* The recipients of this Group DM Channel.
4040
* @type {PartialRecipient[]}
4141
*/
42-
this.recipients = data.recipients;
42+
this.recipients = data.recipients ?? [];
4343

4444
/**
4545
* A manager of the messages belonging to this channel

0 commit comments

Comments
 (0)