From 3825824d7122f90af2eea4b0d028c2fc27a00cfb Mon Sep 17 00:00:00 2001 From: Adhiraj Date: Sun, 16 Aug 2020 22:39:20 +0530 Subject: [PATCH] bug fix --- src/WAConnection/3.Connect.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/WAConnection/3.Connect.ts b/src/WAConnection/3.Connect.ts index c71c35e..f91c2b6 100644 --- a/src/WAConnection/3.Connect.ts +++ b/src/WAConnection/3.Connect.ts @@ -109,7 +109,9 @@ export class WAConnection extends Base { if (json[1].duplicate) json = await this.registerCallbackOneTime (['response', 'type:chat']) if (!json[2]) return - json[2].forEach(([item, chat]: [any, WAChat]) => { + + json[2] + .map(([item, chat]: [any, WAChat]) => { if (!chat) { this.log (`unexpectedly got null chat: ${item}, ${chat}`, MessageLogLevel.info) return