fix diff when changing from element to empty array

This commit is contained in:
Leo Horie 2014-07-06 22:36:49 -04:00
parent 422ff19d18
commit 0354a4e251
2 changed files with 11 additions and 6 deletions

View file

@ -660,6 +660,13 @@ function testMithril(mock) {
m.render(root, m("main", {config: configParent}, m("b", {config: configChild})))
return unloadedParent === 1 && unloadedChild === 1
})
test(function() {
//https://github.com/lhorie/mithril.js/issues/150
var root = mock.document.createElement("div")
m.render(root, [m("a"), m("div")])
m.render(root, [[], m("div")])
return root.childNodes.length == 1 && root.childNodes[0].nodeName == "DIV"
})
//end m.render
//m.redraw