From 364d55938c808758b98ab6b914339b162a9ba5c9 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Sat, 31 May 2014 22:24:17 -0400 Subject: [PATCH] if no categories found return empty array --- src/categories.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/categories.js b/src/categories.js index feb8a9b927..86b4f95ec8 100644 --- a/src/categories.js +++ b/src/categories.js @@ -183,7 +183,7 @@ var db = require('./database'), } if (!Array.isArray(cids) || !cids.length) { - return callback(null, {categories : []}); + return callback(null, []); } Categories.getCategoriesData(cids, callback); @@ -197,7 +197,7 @@ var db = require('./database'), } if (!Array.isArray(cids) || !cids.length) { - return callback(null, {categories : []}); + return callback(null, []); } Categories.getCategories(cids, uid, function(err, categories) {