Skip to content

Commit

Permalink
Fallback to primitive in case of emergency
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Mar 27, 2024
1 parent 9b4227a commit 4f24518
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/react-debug-tools/src/ReactDebugHooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -1003,11 +1003,11 @@ function buildTree(

// For the time being, only State and Reducer hooks support runtime overrides.
const isStateEditable = primitive === 'Reducer' || primitive === 'State';

const name = displayName || primitive;
const levelChild: HooksNode = {
id,
isStateEditable,
name: displayName || 'Unknown',
name: name,
value: hook.value,
subHooks: [],
debugInfo: debugInfo,
Expand Down

0 comments on commit 4f24518

Please sign in to comment.