Fix condition to check for empty result object

This commit is contained in:
Gabriel Pastori 2023-12-11 12:00:33 -03:00
parent 4c69b059d4
commit fd15ae5e8c

View File

@ -64,7 +64,7 @@ export class ChatwootController {
const urlServer = this.configService.get<HttpServer>('SERVER').URL;
if (Object.keys(result).length === 0) {
if (Object.keys(result || {}).length === 0) {
return {
enabled: false,
url: '',