Skip to content

Commit

Permalink
fix: add Error prefix to Error objects names
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxyq committed Sep 16, 2024
1 parent fc5ef50 commit 2439c3c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/react-devtools-shared/src/backend/console.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ export function patch({
// gets printed so to make the colon make sense, we name it so we print Stack:
// and similarly Safari leave an expandable slot.
fakeError.name = enableOwnerStacks
? 'Stack'
: 'Component Stack'; // This gets printed
? 'Error Stack'
: 'Error Component Stack'; // This gets printed
// In Chromium, the stack property needs to start with ^[\w.]*Error\b to trigger stack
// formatting. Otherwise it is left alone. So we prefix it. Otherwise we just override it
// to our own stack.
Expand Down

0 comments on commit 2439c3c

Please sign in to comment.