Fix memory adapter to support lowercase desc order
This commit is contained in:
parent
49be07545a
commit
58e2349575
|
@ -87,7 +87,7 @@ Memory.prototype.all = function all(model, filter, callback) {
|
||||||
var m = key.match(/\s+(A|DE)SC$/i);
|
var m = key.match(/\s+(A|DE)SC$/i);
|
||||||
if (m) {
|
if (m) {
|
||||||
key = key.replace(/\s+(A|DE)SC/i, '');
|
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};
|
orders[i] = {"key": key, "reverse": reverse};
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue