diff --git a/src/controllers/clientController.js b/src/controllers/clientController.js index 0971e3dd..e0001ce9 100644 --- a/src/controllers/clientController.js +++ b/src/controllers/clientController.js @@ -73,7 +73,7 @@ const sendMessage = async (req, res) => { let messageOut switch (contentType) { case 'string': - if (options.media) { + if (options && options.media) { const media = options.media options.media = new MessageMedia(media.mimetype, media.data, media.filename = null, media.filesize = null) }