mirror of
https://github.com/status-im/react-native.git
synced 2025-01-10 17:45:59 +00:00
fc45471af2
Summary: There was an edge case where sometimes a view could be added and removed in the same batch so this caused issues because we ran `disconnectAnimatedNodeFromView` before `connectAnimatedNodeToView`. This separates restoring default values from `disconnectAnimatedNodeFromView` so we can run only `restoreDefaultValues` on the pre-operations queue and just do nothing in case the view doesn't exist (it is fine because we know it will be removed immediately). **Test plan** Tested that native animations still work properly in RNTester and tested that the edge case crash was fixed. Closes https://github.com/facebook/react-native/pull/14114 Differential Revision: D5128989 Pulled By: javache fbshipit-source-id: 9f47a2d3aafeb06d8ed1a4dd1800b8af225edb7d