Skip to content

Commit

Permalink
[fixed-#82] Not need toggle updater.isPending flag if updater already…
Browse files Browse the repository at this point in the history
… 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
Original file line number Diff line number Diff line change
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.