Skip to content

Commit

Permalink
Avoid potentially wasting work by inlining functionName
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Jul 17, 2022
1 parent db8187d commit 6f0ccb5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/react-devtools-shared/src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,10 @@ export function getWrappedDisplayName(
wrapperName: string,
fallbackName?: string,
): string {
const functionName = getDisplayName(innerType, fallbackName);
return (outerType: any).displayName || `${wrapperName}(${functionName})`;
return (
(outerType: any).displayName ||
`${wrapperName}(${getDisplayName(innerType, fallbackName)})`
);
}

export function getDisplayName(
Expand Down

0 comments on commit 6f0ccb5

Please sign in to comment.