joaonuno/tree-model-js — pull request #1 by drfloob (2013-08-07 01:05:10+00:00)
Title: Fix for unstable Array.prototype.sort implementations

Since `Array.prototype.sort` is unstable in various browsers (Chrome,
Android, Opera < 10, Firefox < 3, etc.), children arrays were being
reordered with the previous implementation.

This fix bypasses Array.sort entirely if no comparator is defined,
retaining node order in `TreeModel.parse()`.

See: http://code.google.com/p/v8/issues/detail?id=90
See also: http://ofb.net/~sethml/is-sort-stable.html