Closed DJHightower closed 9 years ago
Investigating now.
Whoops... Wrong button. DIdn't want to close.
Added unit tests for order by and they failed immediately. Fixing.
806a484c52070b60df51914badf52c45be501dfd This was an interesting bug because it wouldn't show itself 100% in Firefox but would do so in IE because IE apparently has a different array.sort algorithm and does things in reverse? With the results going forward (a>b) was enough to correctly sort. But with array.sort in reverse (a>b) wouldn't trigger and would then fall through to (b<a) which is simply the above written backwards. It was supposed to be (b>a). This was a really important find because System.compare is a core method that was causing ordering madness. The fix for undefined was in the previous commit.
Sample code for reproduction:
Let ICustomer be some Interface with a Name-property. Then look at "sorted"'s values. Most of them are "undefined" :-(