diff --git a/models/profile.js b/models/profile.js index 5af1436..5ee8d43 100644 --- a/models/profile.js +++ b/models/profile.js @@ -170,7 +170,7 @@ module.exports = { const promise = new Promise((resolve, reject) => { ProfileModel .find({ _id: profileId, 'messages.$.image': { $exists: true } }) - .select('image') + .select('messages.image') .exec((err, result) => { if (err) { reject(err);