From efa50b8126e285b3372956396a48ac82e2948a25 Mon Sep 17 00:00:00 2001 From: Rodion Shergin Date: Tue, 13 Dec 2016 14:08:44 +0300 Subject: [PATCH] [fixed-#82] Not need toggle updater.isPending flag if updater already is pending. --- src/virtual-dom.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/virtual-dom.js b/src/virtual-dom.js index 08a5ba3..7e1a72a 100644 --- a/src/virtual-dom.js +++ b/src/virtual-dom.js @@ -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) {