From 8256d2b997e57cb5c8bd537e61c51b7b2311fa8d Mon Sep 17 00:00:00 2001 From: psychobunny Date: Wed, 25 Feb 2015 14:15:50 -0500 Subject: [PATCH] bugfix --- src/navigation/index.js | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/navigation/index.js b/src/navigation/index.js index b7ae3b2932..e11f845576 100644 --- a/src/navigation/index.js +++ b/src/navigation/index.js @@ -8,17 +8,13 @@ var navigation = {}, navigation.get = function(callback) { db.getSortedSetRange('navigation:enabled', 0, -1, function(err, data) { - - data = data - .filter(function(item) { - return item.enabled; - }) - .map(function(item) { - return JSON.parse(item); - }); - - callback(err, data); - }) + callback(err, data.map(function(item) { + return JSON.parse(item); + }) + .filter(function(item) { + return item.enabled; + })); + }); };