From 95f3b86f3b02fdcfad56f0aa66fbba9f6ae8a90f Mon Sep 17 00:00:00 2001 From: David Erwin Date: Thu, 10 Nov 2016 15:24:34 -0500 Subject: [PATCH] cleaning up nested objects --- models/comment.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/models/comment.js b/models/comment.js index a80e353f0..8eab6aff4 100644 --- a/models/comment.js +++ b/models/comment.js @@ -107,9 +107,11 @@ CommentSchema.statics.findByStatusByActionType = function(status, action_type) { return Comment.find({ 'status': status, - 'id': {'$in': actions.map(a => { - return a.item_id;} - )} + 'id': { + '$in': actions.map(a => { + return a.item_id; + }) + } }); });