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

can.appendChild passed null el #1621

JustinLove opened this Issue Apr 16, 2015 · 1 comment


None yet
2 participants

JustinLove commented Apr 16, 2015

2.2.4, using amd-dev

The required pieces seem to be:

  • Component viewModel with null or missing attribute, which is later set to a list
  • Attribute used in stache #each
  • The second time that attribute is set, Cannot read property 'appendChild' of null

I traced it back as far as live.js, line 92; masterNodeList has one element, a text node with a parent, but the index check makes the call to element.after substitute [text], which has a parentless node. element.after passes the parent (null) to appendChild.

Workaround: make the attribute default to an empty array.


@daffl daffl added the bug label Apr 21, 2015

@daffl daffl added this to the 2.2.5 milestone Apr 21, 2015


This comment has been minimized.

Show comment
Hide comment

daffl Apr 21, 2015


I think this is the same issue that the #1634 pull request addresses.


daffl commented Apr 21, 2015

I think this is the same issue that the #1634 pull request addresses.

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