Skip to content
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(resolveSuperParameterPropsType): add null check #2232

Merged
merged 1 commit into from Apr 12, 2019

Conversation

jedwards1211
Copy link
Contributor

fix #2179

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, could you add a regression test?

@jedwards1211
Copy link
Contributor Author

Yup, done

@jedwards1211
Copy link
Contributor Author

@ljharb I'm confused by the CI failure, one node version failed with an error that doesn't seem related to my changes, yet an intermittent failure on this seems impossible:

 1) no-unused-prop-types
       valid
         class Hello extends Component {
  componentDidUpdate (prevProps) {
    if (prevProps.foo) {
      return true;
    }
  }
  render() {
    return (<div>{this.props.bar}</div>);
  }
}
Hello.propTypes = {
  foo: PropTypes.string,
  bar: PropTypes.string,
};:
      AssertionError: Should have no errors but had 1: [ { ruleId: null,
    fatal: true,
    severity: 2,
    message: 'Parsing error: Unexpected token {',
    line: 9,
    column: 18 } ]
      + expected - actual
      -1
      +0
      
      at testValidTemplate (node_modules\eslint\lib\testers\rule-tester.js:415:20)
      at Context.RuleTester.it (node_modules\eslint\lib\testers\rule-tester.js:584:25)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

crashes on stateless react class
2 participants