From 4e650f05d13bc2486857656af7a2045e574d88ff Mon Sep 17 00:00:00 2001 From: Eric Vicenti Date: Thu, 2 Jul 2015 10:32:13 -0700 Subject: [PATCH] [ReactNative] setTimeout hack avoids POPAnimation race condition Summary: Having bugs in Groups because POPAnimation experiences a race condition. This hack avoids that for now while we transition away from POPAnimation altogether. --- Libraries/Animation/POPAnimationMixin.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Libraries/Animation/POPAnimationMixin.js b/Libraries/Animation/POPAnimationMixin.js index 115e58a01..bf95f41bf 100644 --- a/Libraries/Animation/POPAnimationMixin.js +++ b/Libraries/Animation/POPAnimationMixin.js @@ -120,7 +120,10 @@ var POPAnimationMixin = { } doneCallback && doneCallback(finished); }; - POPAnimation.addAnimation(nodeHandle, animID, cleanupWrapper); + // Hack to aviod race condition. This delay should be imperceptible: + setTimeout(() => { + POPAnimation.addAnimation(nodeHandle, animID, cleanupWrapper); + }, 10); }, /**