Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 8601d71

Browse files
committedMar 20, 2025··
[dev-overlay] Remove unused fields from unhandled error action event
1 parent d0f0dc9 commit 8601d71

File tree

2 files changed

+0
-7
lines changed

2 files changed

+0
-7
lines changed
 

‎packages/next/src/client/components/react-dev-overlay/app/hot-reloader-client.tsx

-6
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ import type {
3838
TurbopackMsgToBrowser,
3939
} from '../../../../server/dev/hot-reloader-types'
4040
import { REACT_REFRESH_FULL_RELOAD_FROM_ERROR } from '../shared'
41-
import type { HydrationErrorState } from '../../errors/hydration-error-info'
4241
import type { DebugInfo } from '../types'
4342
import { useUntrackedPathname } from '../../navigation-untracked'
4443
import { getReactStitchedError } from '../../errors/stitched-error'
@@ -511,12 +510,8 @@ export default function HotReload({
511510

512511
const handleOnUnhandledError = useCallback(
513512
(error: Error): void => {
514-
const errorDetails = (error as any).details as
515-
| HydrationErrorState
516-
| undefined
517513
// Component stack is added to the error in use-error-handler in case there was a hydration error
518514
const componentStackTrace = (error as any)._componentStack
519-
const warning = errorDetails?.warning
520515

521516
dispatch({
522517
type: ACTION_UNHANDLED_ERROR,
@@ -526,7 +521,6 @@ export default function HotReload({
526521
typeof componentStackTrace === 'string'
527522
? parseComponentStack(componentStackTrace)
528523
: undefined,
529-
warning,
530524
})
531525
},
532526
[dispatch]

‎packages/next/src/client/components/react-dev-overlay/shared.ts

-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ export interface UnhandledErrorAction {
6666
reason: Error
6767
frames: StackFrame[]
6868
componentStackFrames?: ComponentStackFrame[]
69-
warning?: [string, string, string]
7069
}
7170
export interface UnhandledRejectionAction {
7271
type: typeof ACTION_UNHANDLED_REJECTION

0 commit comments

Comments
 (0)
Please sign in to comment.