Skip to content

Commit

Permalink
fix: Fixed fromMe is undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
icleitoncosta committed Apr 9, 2024
1 parent 76cb90c commit d80bc2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/chat/events/registerNewMessageEvent.ts
Expand Up @@ -42,7 +42,7 @@ function register() {
if (typeof MsgModel.prototype.chat === 'undefined') {
Object.defineProperty(MsgModel.prototype, 'chat', {
get: function () {
return ChatStore.get(this.id.fromMe ? this.to : this.from);
return ChatStore.get(this.id?.fromMe ? this.to : this.from);
},
configurable: true,
});
Expand Down

0 comments on commit d80bc2e

Please sign in to comment.