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] displayName: avoid a crash when using React.memo #2587

Merged
merged 1 commit into from Mar 7, 2020

Conversation

golopot
Copy link
Contributor

@golopot golopot commented Mar 7, 2020

This pr adds a null check, to avoid a crash that happens when using React.memo plus a return statement without an argument. Like

import React from 'react';
const Hello = React.memo(function Hello() {
  return;
});

@ljharb ljharb merged commit 185d95c into jsx-eslint:master Mar 7, 2020
@golopot
Copy link
Contributor Author

golopot commented Mar 7, 2020

Thanks!

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.

None yet

2 participants