-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[BUGFIX beta] Fixes computed.sort works incorrectly with empty sort properties array
#13124
Conversation
…properties array`
Looks good to me. Is this a regression? We may want to [BUGFIX release] :/ |
@@ -668,6 +668,9 @@ function normalizeSortProperties(sortProperties) { | |||
} | |||
|
|||
function sortByNormalizedSortProperties(items, normalizedSortProperties) { | |||
if (normalizedSortProperties.length === 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets do
function ...(_items, ...) {
let items = _items.slice()
...
}
one nit-pick, otherwise I also think this looks good |
I believe Im 👍 , my thoughts are here |
more discussion: #13037 (comment) I think we need someone to check what the 1.13.x behavior was |
After discussion, I believe the logic we want is as follows: Ember.A(Ember.isEmpty(sortProperties) ? inputArray.slice() : sort(inputArray)); @mmun c/d |
👍 For future proofing we should assert that sortProperties is not a string or non-null object or something. |
@mmun it seems like null/undefined is fine no? Just means no sort |
Any updates? |
Any update on this? We hit this sort issue when we upgraded our app to Ember 2.4 from 2.3 |
☔ The latest upstream changes (presumably #14203) made this pull request unmergeable. Please resolve the merge conflicts. |
@onechiporenko Sorry for not following up. Do you mind rebasing? or I can if you don't have time. |
@mmun, I would be grateful if you do. |
Fix for #13037