-
Notifications
You must be signed in to change notification settings - Fork 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
Duplicate strings in array while using 'dom-repeat' throws error: 'Uncaught Error: unexpected key undefined' #3062
Comments
I have noticed this too. Only after seeing this issue did I realize that it happens when you use non-unique values in the array. Do you have a work-around? |
@fredefox Using objects instead of primitive values should do the trick. |
Right you are! Thank you. |
I would really love to contribute a PR for this bug if somebody guides me on how to go about it. It would be my first ever PR on GitHub :). |
Just go ahead by following this: https://github.com/Polymer/project/blob/master/Contributing.md |
Revert this once Polymer/polymer#3062 is fixed [ci skip]
I too am getting this error. I am using an array of object which may contain duplicates. It happens on this line: this.splice('selected', indexToRemove, 1); and it seems t happen when deleting a duplicate for the second time. |
/sub |
I have an issue related to this but I am not getting an error thrown. Instead, when I use dom-repeat to bind an array with non-unique strings to input boxes, editing the text inside any input besides the first (using normal user interaction) changes the value in the first input box. Also, this will happens even if the initial values of the bound array are not identical, but become identical later by user input. |
This has been fixed in Polymer 2: http://jsbin.com/fuqarizedo/edit?html,console,output |
Following is the element I made which throws an error mentioned in the title.
This is caused by storing values of an array as keys in the object
pmap
.The text was updated successfully, but these errors were encountered: