From 69980c9d7d8adcab2e2d016b025739472eb21cbf Mon Sep 17 00:00:00 2001 From: gaba Date: Fri, 4 Nov 2016 14:24:04 -0700 Subject: [PATCH] Simplify concat. --- routes/api/stream/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/api/stream/index.js b/routes/api/stream/index.js index a7eb13e0b..ba35b4138 100644 --- a/routes/api/stream/index.js +++ b/routes/api/stream/index.js @@ -13,7 +13,7 @@ router.get('/', (req, res, next) => { const actions = Action.findByItemIdArray(comments.map((comment) => comment.id)); Promise.all([comments, users, actions]).then(([comments, users, actions]) => { - res.json(comments.concat(users).concat(actions)); + res.json(...comments,...users,...actions); }).catch(error => { next(error); });