diff --git a/index.js b/index.js index 4f1e664..90c002a 100644 --- a/index.js +++ b/index.js @@ -36,7 +36,7 @@ module.exports = function() { return false; } }); - itemsFiltered.sort(function(a, b) { return a[Object.keys(a)[0]] < b[Object.keys(b)[0]]; }); + itemsFiltered.sort(function(a, b) { return a[Object.keys(a)[0]] < b[Object.keys(b)[0]] ? 1 : -1 }); for(item in itemsFiltered) { if(itemsFiltered.hasOwnProperty(item)) {