Skip to content

Commit

Permalink
fix: #9307, use _.flatten
Browse files Browse the repository at this point in the history
  • Loading branch information
barisusakli committed Feb 17, 2021
1 parent 2fef462 commit 25c8f02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/categories/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,6 @@ module.exports = function (Categories) {

async function getChildrenCids(cids, uid) {
const childrenCids = await Promise.all(cids.map(cid => Categories.getChildrenCids(cid)));
return await privileges.categories.filterCids('find', childrenCids.flat(), uid);
return await privileges.categories.filterCids('find', _.flatten(childrenCids), uid);
}
};

0 comments on commit 25c8f02

Please sign in to comment.