Skip to content

Commit

Permalink
[fixed-Lucifier129#82] Not need toggle updater.isPending flag if upda…
Browse files Browse the repository at this point in the history
…ter already is pending.
  • Loading branch information
beholderrk committed Dec 13, 2016
1 parent b490083 commit efa50b8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/virtual-dom.js
Expand Up @@ -436,9 +436,10 @@ function updateVcomponent(vcomponent, newVcomponent, node, parentContext) {
node.cache[newVcomponent.uid] = component
cache.parentContext = parentContext
if (component.componentWillReceiveProps) {
updater.isPending = true
let needToggleIsPending = !updater.isPending
if (needToggleIsPending) updater.isPending = true
component.componentWillReceiveProps(nextProps, componentContext)
updater.isPending = false
if (needToggleIsPending) updater.isPending = false
}

if (vcomponent.ref !== newVcomponent.ref) {
Expand Down

0 comments on commit efa50b8

Please sign in to comment.