diff --git a/Libraries/Animated/src/AnimatedImplementation.js b/Libraries/Animated/src/AnimatedImplementation.js index 7fb99069c559b8..7f14a68552b973 100644 --- a/Libraries/Animated/src/AnimatedImplementation.js +++ b/Libraries/Animated/src/AnimatedImplementation.js @@ -1673,7 +1673,11 @@ function createAnimatedComponent(Component: any): any { if (newProps !== this.props) { this._detachNativeEvents(this.props); } - + + // Make sure to the component is not null + if(!this._component){ + return; + } // Make sure to get the scrollable node for components that implement // `ScrollResponder.Mixin`. const ref = this._component.getScrollableNode ? @@ -1689,6 +1693,12 @@ function createAnimatedComponent(Component: any): any { } _detachNativeEvents(props) { + + // Make sure to the component is not null + if(!this._component){ + return; + } + // Make sure to get the scrollable node for components that implement // `ScrollResponder.Mixin`. const ref = this._component.getScrollableNode ?