fix(MessageReaction): Address undefined burst properties (#10597)

* 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>
This commit is contained in:
Jiralite
2024-11-18 11:14:29 +00:00
committed by GitHub
parent 40fbd827fa
commit 2fa7d6246f

View File

@@ -36,7 +36,7 @@ class MessageReaction {
* Whether the client has super-reacted using this emoji * Whether the client has super-reacted using this emoji
* @type {boolean} * @type {boolean}
*/ */
this.meBurst = data.me_burst; this.meBurst = Boolean(data.me_burst);
/** /**
* A manager of the users that have given this reaction * A manager of the users that have given this reaction
@@ -52,7 +52,7 @@ class MessageReaction {
} }
_patch(data) { _patch(data) {
if ('burst_colors' in data) { if (data.burst_colors) {
/** /**
* Hexadecimal colors used for this super reaction * Hexadecimal colors used for this super reaction
* @type {?string[]} * @type {?string[]}