From 02ace21bd2b10c011c6c529c4534c92ac061658b Mon Sep 17 00:00:00 2001 From: Robert Balicki Date: Wed, 31 Aug 2022 14:07:37 -0400 Subject: [PATCH] [react devtools][easy] Fix code highlighting in VSCode (#25155) * Minor change that fixes code highlighting in VSCode in a particular file --- packages/react-devtools-shared/src/utils.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/react-devtools-shared/src/utils.js b/packages/react-devtools-shared/src/utils.js index 48c0ccd64892a..5be41413e39be 100644 --- a/packages/react-devtools-shared/src/utils.js +++ b/packages/react-devtools-shared/src/utils.js @@ -108,8 +108,9 @@ export function getWrappedDisplayName( wrapperName: string, fallbackName?: string, ): string { + const displayName = (outerType: any).displayName; return ( - (outerType: any).displayName || + displayName || `${wrapperName}(${getDisplayName(innerType, fallbackName)})` ); }