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
parent 34343c6afa
commit 76968b4bc1

View File

@@ -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
@@ -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[]}