-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix this._component is null #10636
Fix this._component is null #10636
Conversation
related to #10635
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at [email protected]. Thanks! If you are contributing on behalf of someone else (eg your employer): the individual CLA is not sufficient - use https://developers.facebook.com/opensource/cla?type=company instead. Contact [email protected] if you have any questions. |
This is not an actual fix since we don't know why it became null in the first place. We need to figure out why it's null and fix that. |
@@ -1689,6 +1693,12 @@ function createAnimatedComponent(Component: any): any { | |||
} | |||
|
|||
_detachNativeEvents(props) { | |||
|
|||
// Make sure to the component is not null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keyword-spacing: Expected space(s) after "if".
|
||
// Make sure to the component is not null | ||
if(!this._component){ | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no-mixed-spaces-and-tabs: Mixed spaces and tabs.
@@ -1673,7 +1673,11 @@ function createAnimatedComponent(Component: any): any { | |||
if (newProps !== this.props) { | |||
this._detachNativeEvents(this.props); | |||
} | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no-trailing-spaces: Trailing spaces not allowed.
// Make sure to the component is not null | ||
if(!this._component){ | ||
return; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no-mixed-spaces-and-tabs: Mixed spaces and tabs.
|
||
// Make sure to the component is not null | ||
if(!this._component){ | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no-mixed-spaces-and-tabs: Mixed spaces and tabs.
|
||
|
||
// Make sure to the component is not null | ||
if(!this._component){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keyword-spacing: Expected space(s) after "if".
|
||
|
||
// Make sure to the component is not null | ||
if(!this._component){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no-mixed-spaces-and-tabs: Mixed spaces and tabs.
@@ -1689,6 +1693,12 @@ function createAnimatedComponent(Component: any): any { | |||
} | |||
|
|||
_detachNativeEvents(props) { | |||
|
|||
// Make sure to the component is not null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no-mixed-spaces-and-tabs: Mixed spaces and tabs.
@@ -1689,6 +1693,12 @@ function createAnimatedComponent(Component: any): any { | |||
} | |||
|
|||
_detachNativeEvents(props) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no-trailing-spaces: Trailing spaces not allowed.
// Make sure to the component is not null | ||
if(!this._component){ | ||
return; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no-trailing-spaces: Trailing spaces not allowed.
@@ -1689,6 +1693,12 @@ function createAnimatedComponent(Component: any): any { | |||
} | |||
|
|||
_detachNativeEvents(props) { | |||
|
|||
// Make sure to the component is not null | |||
if(!this._component){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no-mixed-spaces-and-tabs: Mixed spaces and tabs.
hi @satya164 , this is the exception http://crashes.to/s/280c411449d |
@jerson yes, but why does it happen |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
This doesn't fix the fact that |
I meet the mistake is this._component is undefined; what problem is this? |
@jerson there's some comments that haven't been addressed yet, do you still plan to ship this PR? |
Closing since the last comment is a question and this PR has been inactive in a while. If you plan to continue working on this please send a new PR that fixes the root cause. |
related to #10635