Properly detect Lazy views (#906)
Since oldVNode is the only result of lazy view and not the lazy node itself, oldVNode.type !== LAZY_NODE check leads to constant lazy view re-rendering.
This commit is contained in:
parent
a04bef7939
commit
cf6c745147
|
@ -363,10 +363,8 @@ var getTextVNode = function(node) {
|
|||
|
||||
var getVNode = function(newVNode, oldVNode) {
|
||||
return newVNode.type === LAZY_NODE
|
||||
? ((!oldVNode ||
|
||||
(oldVNode.type !== LAZY_NODE ||
|
||||
propsChanged(oldVNode.lazy, newVNode.lazy))) &&
|
||||
((oldVNode = getTextVNode(newVNode.lazy.view(newVNode.lazy))).lazy =
|
||||
? ((!oldVNode || !oldVNode.lazy || propsChanged(oldVNode.lazy, newVNode.lazy))
|
||||
&& ((oldVNode = getTextVNode(newVNode.lazy.view(newVNode.lazy))).lazy =
|
||||
newVNode.lazy),
|
||||
oldVNode)
|
||||
: newVNode
|
||||
|
|
Loading…
Reference in New Issue