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
committed by GitHub
parent 026440c256
commit 320e3a6246

View File

@@ -27,7 +27,7 @@ class PartialGroupDMChannel extends BaseChannel {
* The hash of the channel icon
* @type {?string}
*/
this.icon = data.icon;
this.icon = data.icon ?? null;
/**
* Recipient data received in a {@link PartialGroupDMChannel}.
@@ -39,7 +39,7 @@ class PartialGroupDMChannel extends BaseChannel {
* The recipients of this Group DM Channel.
* @type {PartialRecipient[]}
*/
this.recipients = data.recipients;
this.recipients = data.recipients ?? [];
/**
* A manager of the messages belonging to this channel