normalize arrays
This commit is contained in:
parent
8ff54ccbfd
commit
1e829f1657
2 changed files with 24 additions and 1 deletions
|
|
@ -667,6 +667,17 @@ function testMithril(mock) {
|
|||
m.render(root, [[], m("div")])
|
||||
return root.childNodes.length == 1 && root.childNodes[0].nodeName == "DIV"
|
||||
})
|
||||
test(function() {
|
||||
//https://github.com/lhorie/mithril.js/issues/156
|
||||
var root = mock.document.createElement("div")
|
||||
m.render(root, m("div", [
|
||||
["a", "b", "c", "d"].map(function() {
|
||||
return [m("div"), " "]
|
||||
}),
|
||||
m("span")
|
||||
]))
|
||||
return root.childNodes[0].childNodes[8].nodeName == "SPAN"
|
||||
})
|
||||
//end m.render
|
||||
|
||||
//m.redraw
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue