rename RouteResolver::view back to render to restore diff semantics

prevent double resolving
This commit is contained in:
Leo Horie 2016-08-23 22:33:18 -04:00
parent 17161a05c5
commit 53a83a58f2
6 changed files with 185 additions and 48 deletions

View file

@ -98,8 +98,7 @@ module.exports = function($window) {
initLifecycle(vnode.tag, vnode, hooks)
vnode.instance = Vnode.normalize(vnode.tag.view.call(vnode.state, vnode))
if (vnode.instance != null) {
if(vnode.instance === vnode)
throw Error("A component view mustn't return the vnode that was supplied to it.")
if (vnode.instance === vnode) throw Error("A view cannot return the vnode it received as arguments")
var element = createNode(vnode.instance, hooks, ns)
vnode.dom = vnode.instance.dom
vnode.domSize = vnode.dom != null ? vnode.instance.domSize : 0