Skip to content

Commit

Permalink
fix(formatting): fix the anonymous functional component detection aft…
Browse files Browse the repository at this point in the history
…er babel upgrade
  • Loading branch information
armandabric committed Sep 18, 2019
1 parent abc95f7 commit 7a1b93e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parser/parseReactElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const supportFragment = Boolean(Fragment);

const getReactElementDisplayName = (element: ReactElement<*>): string =>
element.type.displayName ||
element.type.name || // function name
(element.type.name !== '_default' ? element.type.name : null) || // function name
(typeof element.type === 'function' // function without a name, you should provide one
? 'No Display Name'
: element.type);
Expand Down

0 comments on commit 7a1b93e

Please sign in to comment.