Skip to content

Commit

Permalink
Merge pull request #20 from cracker0dks/multibleColumnOrderFix
Browse files Browse the repository at this point in the history
fix sorting by more than one column
  • Loading branch information
jpravetz authored Apr 2, 2017
2 parents 75c30ba + 30cc620 commit ca25ef7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,8 @@ module.exports = function (options) {
*/
function buildOrderingPartial(requestQuery) {
var query = [];
for (var fdx = 0; fdx < _u.isArray(requestQuery.order) ? requestQuery.order.length : 0; ++fdx) {
var l = _u.isArray(requestQuery.order) ? requestQuery.order.length : 0;
for (var fdx = 0; fdx < l; ++fdx) {
var order = requestQuery.order[fdx],
column = requestQuery.columns[order.column];

Expand Down

0 comments on commit ca25ef7

Please sign in to comment.