scope config stack to m.render call

This commit is contained in:
Leo Horie 2014-06-06 18:23:20 -04:00
parent 33ac4fc7d1
commit 8bba1dc9d9
2 changed files with 20 additions and 7 deletions

View file

@ -487,6 +487,19 @@ function testMithril(mock) {
})));
return parent === root
})
test(function() {
var root = mock.document.createElement("div")
var count = 0
m.render(root, m("div", m("a", {
config: function(el) {
var island = mock.document.createElement("div")
count++
if (count > 2) throw "too much recursion..."
m.render(island, m("div"))
}
})));
return count == 1
})
//end m.render
//m.redraw