mirror of
https://github.com/moparisthebest/mail
synced 2024-11-22 17:02:17 -05:00
added sorting by keys in lawnchair dao
This commit is contained in:
parent
1266142ad7
commit
5e14aa0215
@ -72,11 +72,7 @@ app.dao.LawnchairDAO = function(Lawnchair) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// sort keys
|
// sort keys
|
||||||
matchingKeys.sort(function(a, b) {
|
matchingKeys.sort();
|
||||||
if (a < b) return -1;
|
|
||||||
if (b < a) return 1;
|
|
||||||
return 0;
|
|
||||||
});
|
|
||||||
|
|
||||||
// if num is null, list all items
|
// if num is null, list all items
|
||||||
num = (num !== null) ? num : matchingKeys.length;
|
num = (num !== null) ? num : matchingKeys.length;
|
||||||
|
Loading…
Reference in New Issue
Block a user