Skip to content

Commit

Permalink
Merge pull request #88 from beholderrk/bug/issue-82
Browse files Browse the repository at this point in the history
fix #82 Not need toggle updater.isPending flag if updater is already pending.
  • Loading branch information
Lucifier129 committed Dec 13, 2016
2 parents b490083 + efa50b8 commit 44dd19e
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 44dd19e

Please sign in to comment.