Skip to content

Commit

Permalink
fix comparator was using ordering strings, not numbers
Browse files Browse the repository at this point in the history
The old comparator was using the string values of the order attribute
instead of the numeric value, so you would get orders like:
0, 1, 10, 11, 2, 3, 4, 5, 6, 7, 8, 9
  • Loading branch information
crccheck authored and tswicegood committed May 9, 2012
1 parent 121b25d commit 1fd89ec
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Node = Item.extend({
NodeList = ItemList.extend({
model: Node,
comparator: function(node) {
return node.get("order");
return +node.get("order");
}
});

Expand Down

0 comments on commit 1fd89ec

Please sign in to comment.