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:
Jiralite
2025-05-07 17:45:47 +01:00
parent fe5e344adc
commit 9bca4af5fd

View File

@@ -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