Skip to content

Commit 324da0b

Browse files
author
Marine Ripon
committed
fix(sorting): Return only sorting key if order is asc
1 parent 40520b2 commit 324da0b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

angular-sql-query.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,9 @@
464464
var queryOrder = ' ORDER BY ' + sortParams.map(function (_ref) {
465465
var key = _ref.key,
466466
desc = _ref.desc;
467-
return key + ' ' + (desc && 'DESC');
467+
return desc
468+
? key + ' DESC'
469+
: key;
468470
}).join(',');
469471

470472
return query + queryOrder;

0 commit comments

Comments
 (0)