fix node index displacement by null/undefined nodes

This commit is contained in:
Leo Horie 2014-04-20 21:48:33 -04:00
parent f589a33842
commit a425bbca88
10 changed files with 56 additions and 20 deletions

View file

@ -313,6 +313,14 @@ function testMithril(mock) {
var elementAfter = root.childNodes[0]
return elementBefore !== elementAfter
})
test(function() {
//https://github.com/lhorie/mithril.js/issues/56
var root = mock.document.createElement("div")
m.render(root, [null, "foo"])
m.render(root, ["bar"])
console.log(root.childNodes)
return root.childNodes.length == 1
})
//end m.render
//m.redraw