added sorting by keys in lawnchair dao

This commit is contained in:
Tankred Hase 2013-06-03 22:24:26 +02:00
parent 1266142ad7
commit 5e14aa0215
1 changed files with 1 additions and 5 deletions

View File

@ -72,11 +72,7 @@ app.dao.LawnchairDAO = function(Lawnchair) {
}
// sort keys
matchingKeys.sort(function(a, b) {
if (a < b) return -1;
if (b < a) return 1;
return 0;
});
matchingKeys.sort();
// if num is null, list all items
num = (num !== null) ? num : matchingKeys.length;