fix: handle undefined channelMetadata to prevent crash (#127094)

* 💥 fix(Channel): handle undefined channelMetadata to prevent crash

* Update Channel.js

* Update Channel.js

* Update Channel.js

Co-authored-by: @BenyFilho

* Update Channel.js

Co-authored-by: @BenyFilho

* Update Channel.js

Co-authored-by: @BenyFilho

* Update Channel.js

Co-authored-by: @BenyFilho

* Update Channel.js

Co-authored-by:

* fix: update description in Channel.js

co-authored-by: @BenyFilho

---------

Co-authored-by: BenyFilho <168232825+BenyFilho@users.noreply.github.com>
This commit is contained in:
Wallace Frota 2026-03-24 10:47:52 -03:00 • committed by GitHub
commit 7f54af0986
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -41,7 +41,8 @@ class Channel extends Base {
* The channel description * The channel description
* @type {string} * @type {string}
*/ */
this.description = data.channelMetadata.description; this.description =
data.channelMetadata?.description ?? data.description ?? '';
/** /**
* Indicates if it is a Channel * Indicates if it is a Channel