File tree 1 file changed +5
-3
lines changed
packages/react-devtools-shared/src/backend
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -468,8 +468,9 @@ export function getInternalReactConstants(
468
468
return type ;
469
469
case HostPortal :
470
470
case HostText :
471
- case Fragment :
472
471
return null ;
472
+ case Fragment :
473
+ return 'Fragment' ;
473
474
case LazyComponent :
474
475
// This display name will not be user visible.
475
476
// Once a Lazy component loads its inner component, React replaces the tag and type.
@@ -981,7 +982,7 @@ export function attach(
981
982
982
983
// NOTICE Keep in sync with get*ForFiber methods
983
984
function shouldFilterFiber ( fiber : Fiber ) : boolean {
984
- const { _debugSource , tag , type } = fiber;
985
+ const { _debugSource , tag , type , key } = fiber;
985
986
986
987
switch (tag) {
987
988
case DehydratedSuspenseComponent :
@@ -993,13 +994,14 @@ export function attach(
993
994
return true ;
994
995
case HostPortal :
995
996
case HostText :
996
- case Fragment :
997
997
case LegacyHiddenComponent :
998
998
case OffscreenComponent :
999
999
return true ;
1000
1000
case HostRoot :
1001
1001
// It is never valid to filter the root element.
1002
1002
return false ;
1003
+ case Fragment :
1004
+ return key === null ;
1003
1005
default :
1004
1006
const typeSymbol = getTypeSymbol ( type ) ;
1005
1007
You can’t perform that action at this time.
0 commit comments