Skip to content

Commit

Permalink
fix: return null if not found
Browse files Browse the repository at this point in the history
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
  • Loading branch information
monbrey and SpaceEEC committed Jun 24, 2021
1 parent 2cd09bf commit 403ace2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/structures/MessageComponentInteraction.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class MessageComponentInteraction extends Interaction {
return this.message.components
.map(row => row.components)
.flat()
.find(component => (component.customID ?? component.custom_id) === this.customID);
.find(component => (component.customID ?? component.custom_id) === this.customID) ?? null;
}

/**
Expand Down

0 comments on commit 403ace2

Please sign in to comment.