hugoware / jlinq-beta

Total rewrite of jLinq - Public beta code
http://hugoware.net/projects/jlinq
237 stars 59 forks source link

Sort issues with multiple keys #2

Closed aaronholsonege closed 13 years ago

aaronholsonege commented 13 years ago

There is an issue with the sort method when multiple keys are specified and one of them has a desc flag ('-column').

Here is an example: http://jsfiddle.net/tFrGu/

I found changing line 715 from:

sorted = sorted.concat(records);

to:

sorted = (desc) ? records.concat(sorted) : sorted.concat(records);

fixes the issue.