Skip to content

Commit

Permalink
Fix for ReactDevTools node picker (support#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
hbenl committed Feb 28, 2022
1 parent 206cba2 commit 18e5f46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ui/components/SecondaryToolbox/ReactDevTools.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ class ReplayWall implements Wall {
for (const rootID of this.store!._roots) {
const rendererID = this.store!._rootIDToRendererID.get(rootID)!;
const elementIDs = JSON.stringify(this.collectElementIDs(rootID));
const expr = `${elementIDs}.reduce((map, id) => { for (node of ${getDOMNodes}(${rendererID}, id)) { map.set(node, id); } return map; }, new Map())`;
const expr = `${elementIDs}.reduce((map, id) => { for (node of ${getDOMNodes}(${rendererID}, id) || []) { map.set(node, id); } return map; }, new Map())`;
const response = await ThreadFront.evaluate({ asyncIndex: 0, text: expr });
if (response.returned) {
const entries = response.returned.previewContainerEntries();
Expand Down

1 comment on commit 18e5f46

@vercel
Copy link

@vercel vercel bot commented on 18e5f46 Feb 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.