-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot sort arrays #104
Comments
Hey @dantman, thanks for the suggestion. It fails because can't sort an immutable array, but maybe the In the meanwhile you can try the long way,
|
It's a bit more complex but in the meantime my workaround actually is: items = items.splice(0, items.length, ...sortBy(items.slice(), sortFunction));
And for now to get |
I am afraid that you will never get |
@arqex I'm talking about the scenario where your array is > var a = new Freezer({a:1}); a.get() === a.get().set({a:1});
true |
Sorting arrays does not appear to be sorted.
It would also be nice if
var arr = (new Freezer([1,2,3]).get(); arr.sort() === arr;
and didn't result in an update (same order).Might as well also support a
sortBy
since 3rd party implementations like lodash's probably can't be used with the immutable code.The text was updated successfully, but these errors were encountered: