Skip to content

Commit

Permalink
fix(MessagePayload): prevent spread of undefined (#7029)
Browse files Browse the repository at this point in the history
  • Loading branch information
kyranet committed Nov 29, 2021
1 parent 2c91c48 commit fabd343
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/structures/MessagePayload.js
Expand Up @@ -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;
}
Expand Down

0 comments on commit fabd343

Please sign in to comment.