crysalead-js / dom-layer

Virtual DOM implementation.
MIT License
30 stars 1 forks source link

Patching may render nodes with no parent #71

Closed brandonpayton closed 8 years ago

brandonpayton commented 8 years ago

This and this from src/tree/patch.js combined with Tag#render, which now takes two arguments, mean that some nodes inserted by patch are created without a node parent.

I updated the patch text and node insertion specs to reproduce by asserting that immediate children of the from and to trees have a parent. Only the to trees fail the assertion. The repro commit is here.

jails commented 8 years ago

Good catch, open it as PR so I can merge it.

jails commented 8 years ago

I'm closing this in flavor of the PR.