Skip to content

Commit a1cdb5b

Browse files
committed
fix: consider alternate as a key for componentLogsEntry when inspecting raw fiber instance
1 parent e495392 commit a1cdb5b

File tree

1 file changed

+4
-1
lines changed
  • packages/react-devtools-shared/src/backend/fiber

1 file changed

+4
-1
lines changed

packages/react-devtools-shared/src/backend/fiber/renderer.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4248,7 +4248,10 @@ export function attach(
42484248
source = getSourceForFiberInstance(fiberInstance);
42494249
}
42504250

4251-
const componentLogsEntry = fiberToComponentLogsMap.get(fiber);
4251+
let componentLogsEntry = fiberToComponentLogsMap.get(fiber);
4252+
if (componentLogsEntry === undefined && fiber.alternate !== null) {
4253+
componentLogsEntry = fiberToComponentLogsMap.get(fiber.alternate);
4254+
}
42524255

42534256
return {
42544257
id: fiberInstance.id,

0 commit comments

Comments
 (0)