Fix memory adapter to support lowercase desc order

This commit is contained in:
Anatoliy Chakkaev 2013-03-26 23:33:40 +04:00
parent 49be07545a
commit 58e2349575
1 changed files with 1 additions and 1 deletions

View File

@ -87,7 +87,7 @@ Memory.prototype.all = function all(model, filter, callback) {
var m = key.match(/\s+(A|DE)SC$/i);
if (m) {
key = key.replace(/\s+(A|DE)SC/i, '');
if (m[1] === 'DE') reverse = -1;
if (m[1].toLowerCase() === 'de') reverse = -1;
}
orders[i] = {"key": key, "reverse": reverse};
});