Skip to content

Commit

Permalink
fix(MessageReaction): Address undefined burst properties (#10597)
Browse files Browse the repository at this point in the history
* fix(MessageReaction): `undefined` burst properties

* refactor: simpler burst colour check

Co-authored-by: Almeida <github@almeidx.dev>

---------

Co-authored-by: Almeida <github@almeidx.dev>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
3 people committed Nov 18, 2024
1 parent 34343c6 commit 76968b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/discord.js/src/structures/MessageReaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class MessageReaction {
* Whether the client has super-reacted using this emoji
* @type {boolean}
*/
this.meBurst = data.me_burst;
this.meBurst = Boolean(data.me_burst);

/**
* A manager of the users that have given this reaction
Expand All @@ -52,7 +52,7 @@ class MessageReaction {
}

_patch(data) {
if ('burst_colors' in data) {
if (data.burst_colors) {
/**
* Hexadecimal colors used for this super reaction
* @type {?string[]}
Expand Down

0 comments on commit 76968b4

Please sign in to comment.