[core] Cannot read properties of null (reading 'conversation')

fix #521
This commit is contained in:
devlikepro committed 2024-08-29 09:14:16 +07:00
1 parent 9dd5eb4eeb
commit 440ac087ad
1 file changed
+4 -1
+4 -1
View File
@@ -1283,7 +1283,10 @@ export class WhatsappSessionNoWebCore extends WhatsappSession {
});
}
protected extractBody(message) {
protected extractBody(message): string | null {
if (!message) {
return null;
}
let body = message.conversation;
if (!body) {
// Some of the messages have no conversation, but instead have text in extendedTextMessage