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

Uncaught TypeError When splicing an array into emptiness #1714

Closed
andrepl opened this issue Jun 2, 2015 · 3 comments
Closed

Uncaught TypeError When splicing an array into emptiness #1714

andrepl opened this issue Jun 2, 2015 · 3 comments
Assignees
Labels

Comments

@andrepl
Copy link

andrepl commented Jun 2, 2015

This appears to happen when the last element of an array is spliced out using the array manipulation helper 'splice'.

Uncaught TypeError: Cannot read property '0' of null
    Polymer._detachRow @ polymer.html:3425
    (anonymous function) @ polymer.html:3409
    Polymer._applySplicesArraySort @ polymer.html:3407
    Polymer._render @ polymer.html:3278
    Polymer.Templatizer._flushTemplates @ polymer.html:2900
    Polymer.Debounce.Debouncer.complete @ polymer.html:847
    atEndOfMicrotask @ polymer.html:808
@kevinpschaaf
Copy link
Member

I'm having trouble reproducing. Could you try modifying this jsBin to cause the problem you're seeing? Thanks!

http://jsbin.com/yeqapupuza/2/edit

@andrepl
Copy link
Author

andrepl commented Jun 3, 2015

Turns out it's related to nested repeats and removing the parent item when its list of children is empty, so it's a bit more complicated to reproduce, but this appears to do it.

http://jsbin.com/hukoponuna/2/edit?html,console,output

@kevinpschaaf
Copy link
Member

Perfect, thanks for the repro.

I confirmed this issue will be solved by the fix in #1629, which should be merged shortly.

Here is your jsbin using that branch, for confirmation:
http://jsbin.com/tikayu/2/edit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants