From 4db7b2aff329469ebb5914ed5b9ac1886704a65c Mon Sep 17 00:00:00 2001 From: rawee Date: Thu, 8 Dec 2022 21:21:06 +0530 Subject: [PATCH] number format corrected for chats-out node --- whatsappLink.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/whatsappLink.js b/whatsappLink.js index f1bda91..7215958 100644 --- a/whatsappLink.js +++ b/whatsappLink.js @@ -36,8 +36,13 @@ module.exports = function(RED) { }; WAConnect(); - async function WAClose(){ - await client.destroy(); + function WAClose(){ + try { + client.destroy(); + } + catch(e){ + WAnode.err(`Error : Too many instructions! Try again.`) + } }; async function connectionSetup(){ @@ -78,7 +83,6 @@ module.exports = function(RED) { this.WAConnect = WAConnect; this.client = client; - this.WARestart = WARestart; this.whatsappConnectionStatus = whatsappConnectionStatus; }