make sure element is child of correct parent if child is recycled but parent is not

This commit is contained in:
Leo Horie 2014-04-01 14:40:02 -04:00
parent 1385fc6268
commit 49dffe7e0e
7 changed files with 32 additions and 5 deletions

View file

@ -105,6 +105,12 @@ function testMithril(mock) {
m.render(root, m("div", [undefined]))
return root.childNodes[0].childNodes.length === 0
})
test(function() {
var root = mock.document.createElement("div")
m.render(root, m("div.classname", [m("a", {href: "/first"})]))
m.render(root, m("div", [m("a", {href: "/second"})]))
return root.childNodes[0].childNodes.length == 1
})
//m.redraw
test(function() {