Skip to content

Commit b44f4dd

Browse files
JoshuaGrossfacebook-github-bot
authored andcommitted
LayoutAnimations: fix mutation ordering hitting assert
Summary: When REMOVE animations finish, they are hitting asserts in StubViewTree because of UPDATEs and REMOVEs being out-of-order. By simply not forcing REMOVEs to happen before UPDATEs, this problem seems to go away. Long-term (in a couple weeks, likely) I want to add unit tests to catch all cases like this, but I'm comfortable with this change since it does fix a known assert failure. Changelog: [Internal] Differential Revision: D28086223 fbshipit-source-id: eb77ea94d76e996d7b2cb37038ce6f2a9799f8b4
1 parent 2b67631 commit b44f4dd

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

ReactCommon/react/renderer/animations/LayoutAnimationKeyFrameManager.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -300,14 +300,6 @@ static inline bool shouldFirstComeBeforeSecondMutation(
300300
return true;
301301
}
302302

303-
// Update comes last, before deletes
304-
if (rhs.type == ShadowViewMutation::Type::Update) {
305-
return true;
306-
}
307-
if (lhs.type == ShadowViewMutation::Type::Update) {
308-
return false;
309-
}
310-
311303
// Remove comes before insert
312304
if (lhs.type == ShadowViewMutation::Type::Remove &&
313305
rhs.type == ShadowViewMutation::Type::Insert) {

0 commit comments

Comments
 (0)