mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 11:33:30 +01:00
fix(MessagePayload): prevent spread of undefined (#7029)
This commit is contained in:
@@ -182,7 +182,7 @@ class MessagePayload {
|
|||||||
description: file.description,
|
description: file.description,
|
||||||
}));
|
}));
|
||||||
if (Array.isArray(this.options.attachments)) {
|
if (Array.isArray(this.options.attachments)) {
|
||||||
this.options.attachments.push(...attachments);
|
this.options.attachments.push(...(attachments ?? []));
|
||||||
} else {
|
} else {
|
||||||
this.options.attachments = attachments;
|
this.options.attachments = attachments;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user