Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Bug in sort function of usage example #2

Open
urraka opened this Issue · 0 comments

1 participant

@urraka

Not a big problem but it can be misleading. The sort function should return a value less than 0 when a goes before b, 0 when equal, and greater than 0 when a goes after b.

A correction could be something like this:

blocks.sort(function(a,b) { return (b.h - a.h); });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.