mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Check null values in shouldAnimate
Summary: Looks like there could be cases when the NativeHirearchyManager may be asking if it should animate on a view that has been removed. Adding a null check Changelog: [General] [Fixed] - Check null values in shouldAnimate Reviewed By: makovkastar Differential Revision: D20063054 fbshipit-source-id: 5b3b1c27b9aba57a592bd8d4e27a970cf0912b5d
This commit is contained in:
committed by
Facebook Github Bot
parent
8ae3174873
commit
3498b3b96b
+3
@@ -88,6 +88,9 @@ public class LayoutAnimationController {
|
||||
// resume when view is re-attached to parent, which is the standard android animation behavior.
|
||||
// If there's a layout handling animation going on, it should be animated nonetheless since the
|
||||
// ongoing animation needs to be updated.
|
||||
if (viewToAnimate == null) {
|
||||
return false;
|
||||
}
|
||||
return (mShouldAnimateLayout && viewToAnimate.getParent() != null)
|
||||
|| mLayoutHandlers.get(viewToAnimate.getId()) != null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user