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 Jan 27, 2019
1 parent 7b441ed commit 8e55ab9
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 8e55ab9

Please sign in to comment.