File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
packages/react-devtools-shared/src/backend/fiber Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -1029,6 +1029,10 @@ export function attach(
10291029 if ( devtoolsInstance . kind === FIBER_INSTANCE ) {
10301030 const fiber = devtoolsInstance . data ;
10311031 componentLogsEntry = fiberToComponentLogsMap . get ( fiber ) ;
1032+
1033+ if ( componentLogsEntry === undefined && fiber . alternate !== null ) {
1034+ componentLogsEntry = fiberToComponentLogsMap . get ( fiber . alternate ) ;
1035+ }
10321036 } else {
10331037 const componentInfo = devtoolsInstance . data ;
10341038 componentLogsEntry = componentInfoToComponentLogsMap . get ( componentInfo ) ;
@@ -4248,7 +4252,10 @@ export function attach(
42484252 source = getSourceForFiberInstance ( fiberInstance ) ;
42494253 }
42504254
4251- const componentLogsEntry = fiberToComponentLogsMap.get(fiber);
4255+ let componentLogsEntry = fiberToComponentLogsMap.get(fiber);
4256+ if (componentLogsEntry === undefined && fiber . alternate !== null ) {
4257+ componentLogsEntry = fiberToComponentLogsMap . get ( fiber . alternate ) ;
4258+ }
42524259
42534260 return {
42544261 id : fiberInstance . id ,
You can’t perform that action at this time.
0 commit comments