From 440ac087adb250f0c0eb7771ccfaffb02e8bf3a4 Mon Sep 17 00:00:00 2001 From: devlikepro Date: Thu, 29 Aug 2024 09:11:47 +0700 Subject: [PATCH] [core] Cannot read properties of null (reading 'conversation') fix #521 --- src/core/engines/noweb/session.noweb.core.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/engines/noweb/session.noweb.core.ts b/src/core/engines/noweb/session.noweb.core.ts index 649f003e..8d37551c 100644 --- a/src/core/engines/noweb/session.noweb.core.ts +++ b/src/core/engines/noweb/session.noweb.core.ts @@ -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