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