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 Apr 3, 2024
1 parent 81f4373 commit 62d0cba
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 @@ -1004,11 +1004,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 62d0cba

Please sign in to comment.