From fd15ae5e8c1cb934104051b79dbe486ce27627b9 Mon Sep 17 00:00:00 2001 From: Gabriel Pastori <58153955+gabrielpastori1@users.noreply.github.com> Date: Mon, 11 Dec 2023 12:00:33 -0300 Subject: [PATCH] Fix condition to check for empty result object --- src/whatsapp/controllers/chatwoot.controller.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/whatsapp/controllers/chatwoot.controller.ts b/src/whatsapp/controllers/chatwoot.controller.ts index 46b93aee4..40ab1bca0 100644 --- a/src/whatsapp/controllers/chatwoot.controller.ts +++ b/src/whatsapp/controllers/chatwoot.controller.ts @@ -64,7 +64,7 @@ export class ChatwootController { const urlServer = this.configService.get('SERVER').URL; - if (Object.keys(result).length === 0) { + if (Object.keys(result || {}).length === 0) { return { enabled: false, url: '',