Skip to content
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

Wrong #each index when object key #1462

Closed
peterdenev opened this issue Nov 11, 2014 · 1 comment · Fixed by #1474
Closed

Wrong #each index when object key #1462

peterdenev opened this issue Nov 11, 2014 · 1 comment · Fixed by #1474

Comments

@peterdenev
Copy link

data:{
items: {
'01': 'One',
'02': 'Two'
}
}

When iterating: index return '1' and '2', but must return '01', '02'

http://jsfiddle.net/94hc61L5/

@Madgvox
Copy link
Member

Madgvox commented Nov 11, 2014

Looks like it's casting the index to a number, which is causing it to trim leading zeroes. For example,

data:{
  items: {
    '0x000001': 'One',
    '02': 'Two'
  }
}

This produces the same result in the js fiddle as just using '01'.

evs-chris added a commit that referenced this issue Nov 28, 2014
Index refactor - RFC

Fixes #1476, Fixes #1462, Fixes #1444
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 a pull request may close this issue.

2 participants