Skip to content

Conversation

yungsters
Copy link
Contributor

Currently, react-docgen fatals on components assigned to non-identifier/literals. For example:

Foo.Bar = () => {};
// TypeError: Argument must be an Identifier or a Literal

This fixes it by checking the left expression of the assignment before attempting to extract its name.

Test Plan:

yarn test
yarn flow
yarn lint

@yungsters yungsters requested review from danez and fkling October 23, 2018 04:09
@danez
Copy link
Collaborator

danez commented Oct 24, 2018

Thanks

@danez danez merged commit d25d262 into reactjs:master Oct 24, 2018
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants