Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,11 @@ function updateTree(

i += 3;

// If the node already exists, it may be a race condition when the page
// reloads during profiling. In this case, remove the old node first
// before adding the new one.
if (nodes.has(id)) {
throw new Error(
`Commit tree already contains fiber "${id}". This is a bug in React DevTools.`,
);
nodes.delete(id);
}

if (type === ElementTypeRoot) {
Expand Down