From 031f38ca9e4c2445117d0248a182483bab23408f Mon Sep 17 00:00:00 2001 From: Mike Fitzpatrick Date: Sun, 4 Mar 2018 21:33:56 -0500 Subject: [PATCH] no message --- models/profile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/profile.js b/models/profile.js index a59af0e..285aba3 100644 --- a/models/profile.js +++ b/models/profile.js @@ -169,7 +169,7 @@ module.exports = { allMessageImages: (e, profileId) => { const promise = new Promise((resolve, reject) => { ProfileModel - .find({ _id: profileId, 'messages.image': { $exists: true, $ne: null } }) + .find({ _id: profileId, 'messages.image': { $exists: true }, $and: { 'messages.image': { $ne: null } } }) .select('messages.image') .exec((err, result) => { if (err) {