Skip to content

Conversation

@defcc
Copy link
Member

@defcc defcc commented Sep 26, 2016

fix #3768

Object.keys(groupedMap) returns an array whose elements are strings, so it breaks the sort function.

@posva
Copy link
Member

posva commented Sep 26, 2016

Thanks! LGTM
I'm not sure about the test though

@defcc
Copy link
Member Author

defcc commented Sep 27, 2016

Ok, current test case seems not to fully cover the code. I will try to update the test case soon


var index = 0
var priorities = Object.keys(groupedMap).sort(function (a, b) {
var priorities = keys.sort(function (a, b) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sort is in-place, so we can just name this array priorities from the start, no need to assign a separate variable.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, I have updated the code :)

@defcc
Copy link
Member Author

defcc commented Sep 27, 2016

forgot it. I will fix it later today

@yyx990803 yyx990803 merged commit eca73f2 into vuejs:dev Sep 27, 2016
@yyx990803
Copy link
Member

Thanks! 👍

@juukie
Copy link

juukie commented Sep 28, 2016

Thanks, fixed the bug 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Directive params casted into strings

4 participants