ensure null doesn't displace next siblings

This commit is contained in:
Leo Horie 2016-12-02 20:41:07 -05:00
parent 2411303be8
commit 2f7c4983f3
2 changed files with 22 additions and 2 deletions

View file

@ -879,4 +879,17 @@ o.spec("updateNodes", function() {
o(onupdate.callCount).equals(0)
})
o("null stays in place", function() {
var vnodes = [{tag: "div"}, {tag: "a"}]
var temp = [null, {tag: "a"}]
var updated = [{tag: "div"}, {tag: "a"}]
render(root, vnodes)
var before = vnodes[1].dom
render(root, temp)
render(root, updated)
var after = updated[1].dom
o(before).equals(after)
})
})