File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
packages/react-devtools-shared/src/backend Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -468,8 +468,9 @@ export function getInternalReactConstants(
468468 return type ;
469469 case HostPortal :
470470 case HostText :
471- case Fragment :
472471 return null ;
472+ case Fragment :
473+ return 'Fragment' ;
473474 case LazyComponent :
474475 // This display name will not be user visible.
475476 // Once a Lazy component loads its inner component, React replaces the tag and type.
@@ -981,7 +982,7 @@ export function attach(
981982
982983 // NOTICE Keep in sync with get*ForFiber methods
983984 function shouldFilterFiber ( fiber : Fiber ) : boolean {
984- const { _debugSource , tag , type } = fiber;
985+ const { _debugSource , tag , type , key } = fiber;
985986
986987 switch (tag) {
987988 case DehydratedSuspenseComponent :
@@ -993,13 +994,14 @@ export function attach(
993994 return true ;
994995 case HostPortal :
995996 case HostText :
996- case Fragment :
997997 case LegacyHiddenComponent :
998998 case OffscreenComponent :
999999 return true ;
10001000 case HostRoot :
10011001 // It is never valid to filter the root element.
10021002 return false ;
1003+ case Fragment :
1004+ return key === null ;
10031005 default :
10041006 const typeSymbol = getTypeSymbol ( type ) ;
10051007
You can’t perform that action at this time.
0 commit comments