mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-17 19:37:02 +00:00
🐛 fixing Cannot read property 'name' of null
This commit is contained in:
@@ -10,7 +10,9 @@ const GetDefaultWhatsAppByUser = async (
|
||||
return null;
|
||||
}
|
||||
|
||||
logger.info(`Found whatsapp linked to user '${user.name}' is '${user.whatsapp.name}'.`);
|
||||
if(user.whatsapp !== null) {
|
||||
logger.info(`Found whatsapp linked to user '${user.name}' is '${user.whatsapp.name}'.`);
|
||||
}
|
||||
|
||||
return user.whatsapp;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user