#476 fix conditional
This commit is contained in:
parent
bfa1767d81
commit
b8a7d7217d
2 changed files with 7 additions and 2 deletions
|
|
@ -285,7 +285,7 @@ var m = (function app(window, undefined) {
|
||||||
configs.push(callback(data, [node, !isNew, context, cached]))
|
configs.push(callback(data, [node, !isNew, context, cached]))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (typeof dataType != FUNCTION) {
|
else if (typeof data != FUNCTION) {
|
||||||
//handle text nodes
|
//handle text nodes
|
||||||
var nodes;
|
var nodes;
|
||||||
if (cached.nodes.length === 0) {
|
if (cached.nodes.length === 0) {
|
||||||
|
|
|
||||||
|
|
@ -853,6 +853,11 @@ function testMithril(mock) {
|
||||||
])
|
])
|
||||||
return root.childNodes.map(function(node) {return node.id}).join() == "div-1,div-3,div-2"
|
return root.childNodes.map(function(node) {return node.id}).join() == "div-1,div-3,div-2"
|
||||||
})
|
})
|
||||||
|
test(function() {
|
||||||
|
var root = mock.document.createElement("div")
|
||||||
|
m.render(root, m("div", function() {}))
|
||||||
|
return root.childNodes[0].childNodes.length == 0
|
||||||
|
})
|
||||||
//end m.render
|
//end m.render
|
||||||
|
|
||||||
//m.redraw
|
//m.redraw
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue