render clears non-mithril dom nodes
This commit is contained in:
parent
5eb9c9010b
commit
c92e24b7e1
4 changed files with 31 additions and 2 deletions
|
|
@ -514,7 +514,12 @@ module.exports = function($window) {
|
|||
function render(dom, vnodes) {
|
||||
var hooks = []
|
||||
var active = $doc.activeElement
|
||||
if (dom.vnodes == null) dom.vnodes = []
|
||||
|
||||
// First time rendering into a node clears it out
|
||||
if (dom.vnodes == null) {
|
||||
dom.vnodes = []
|
||||
dom.textContent = "";
|
||||
}
|
||||
|
||||
if (!(vnodes instanceof Array)) vnodes = [vnodes]
|
||||
updateNodes(dom, dom.vnodes, Vnode.normalizeChildren(vnodes), hooks, null, undefined)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue