-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Handle undefined
tag
#839
Handle undefined
tag
#839
Conversation
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.
Could you provide a test that fails without this change?
Here is a minimal example that causes the error for me: const Parent = React.createClass({
render: function() {
return <Child a={this.props.a}/>;
}
}); However, I tried adding this as a test and the test appears to pass with the existing code. I'm not sure what would cause this or how to induce this error in test-mode, but I can repeatedly generate this error in my environment. |
Is your environment in strict or sloppy mode? |
How do I check that? I assume it is whatever the default is because I haven't configured anything like that to my knowledge |
@pfhayes if you have If you add |
I don't believe I have configured eslint to use sourceType modules because I do not know how to do that. I am also not using 'use strict' |
@pfhayes are you using babel? any code inside |
Yes, the code is being compiled with babel. The example provided has no imports/exports or class declarations (the example provided was the entire contents of the file that introduced the error) I tried to reproduce this error recently and was unable to. I'm not sure what the cause was - perhaps an error in a dependent module that was fixed by an |
Here's one way to replicate it:
|
Thanks for the contribution. Feel free to re-open with a test! |
@xeodou if you can provide a test case in a PR, or better, a test case with a fix, then we'd love to merge it! |
Sure @ljharb i'll do. |
Hi @ljharb I just found the use case and create pull request, please feel free to make some comments. |
[Fix] handle self-referencing jsx tag names Fixes #839.
I have observed this error: