From 968be7d8de5110027a4baeeedba787a144a1007c Mon Sep 17 00:00:00 2001 From: Baris Usakli Date: Tue, 6 Nov 2018 13:35:55 -0500 Subject: [PATCH] make lint happy --- src/categories/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/categories/index.js b/src/categories/index.js index 15ac168aab..18eb51e872 100644 --- a/src/categories/index.js +++ b/src/categories/index.js @@ -280,6 +280,7 @@ function getChildrenRecursive(category, uid, callback) { } Categories.getChildrenCids = function (rootCid, callback) { + var allCids = []; function recursive(currentCid, callback) { db.getSortedSetRange('cid:' + currentCid + ':children', 0, -1, function (err, childrenCids) { if (err) { @@ -295,11 +296,11 @@ Categories.getChildrenCids = function (rootCid, callback) { }, callback); }); } - var allCids = []; + recursive(rootCid, function (err) { callback(err, _.uniq(allCids)); }); -} +}; Categories.flattenCategories = function (allCategories, categoryData) { categoryData.forEach(function (category) {