-
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
JS error with dom-repeat and async splice array element in followed by remove last element #2009
Comments
The Please see this version of your Plunkr |
@LM450N Polymer 1.0 requires |
Yes you're right. I learned this yesterday. My apologies. |
If you remove the last element first, then insert an element, there's no error, but once all elements are the same, dom-repeat does strange things. |
Confirmed the issue, fix is in progress. |
Fix reuse logic to handle multiple mutations in same turn. Fixes #2009.
The primary issue related to errors (throwing) when mutating an array multiple times in the same turn is resolved. @trevordixon Note that your repro case also exhibited the issue in #1913 since you were pushing duplicate values ( Original repro on master: Confirmed that replacing Stay tuned on #1913 if the duplicates issue was important to your use case... |
If I store 'this' in self variable and after REST operation success if I do self.shift('arrayName') or self.shift('arrayName', 1, 1). This operation fails. It adds weird item in array which results in this error: polymer.html:4209 [dom-repeat::dom-repeat]: expected array for |
Demonstration: http://plnkr.co/edit/isFkxmfNUa5mrhZL1wST?p=preview
If you splice an element into an array then remove the last element (in that order), in an async handler, and the array is items for a dom-repeat, you'll trigger a javascript error "Cannot read property '_children' of undefined".
The text was updated successfully, but these errors were encountered: