if (parent) {
insert(this.nodes, parent, this.anchor)
- if (this.updated) {
+ // anchor isConnected indicates the this render is updated
+ if (this.anchor.isConnected && this.updated) {
this.updated.forEach(hook => hook(this.nodes))
}
}
}
frag.nodes = vnode.el as any
- if (frag.updated) frag.updated.forEach(m => m())
+ if (isMounted && frag.updated) frag.updated.forEach(m => m())
}
frag.remove = unmount
}
}
- if (frag.updated) frag.updated.forEach(m => m())
+ if (isMounted && frag.updated) frag.updated.forEach(m => m())
}
const render = (parentNode?: ParentNode, anchor?: Node | null) => {