File tree 3 files changed +3
-9
lines changed
packages/next/src/client/components
3 files changed +3
-9
lines changed Original file line number Diff line number Diff line change 6
6
export type HydrationErrorState = {
7
7
// Hydration warning template format: <message> <serverContent> <clientContent>
8
8
warning ?: [ string , string , string ]
9
- componentStack ?: string
10
9
serverContent ?: string
11
10
clientContent ?: string
12
11
// React 19 hydration diff format: <notes> <link> <component diff?>
Original file line number Diff line number Diff line change @@ -515,8 +515,7 @@ export default function HotReload({
515
515
| HydrationErrorState
516
516
| undefined
517
517
// Component stack is added to the error in use-error-handler in case there was a hydration error
518
- const componentStackTrace =
519
- ( error as any ) . _componentStack || errorDetails ?. componentStack
518
+ const componentStackTrace = ( error as any ) . _componentStack
520
519
const warning = errorDetails ?. warning
521
520
522
521
dispatch ( {
Original file line number Diff line number Diff line change 1
1
import * as Bus from './bus'
2
2
import { parseStack } from '../utils/parse-stack'
3
3
import { parseComponentStack } from '../utils/parse-component-stack'
4
- import {
5
- hydrationErrorState ,
6
- storeHydrationErrorStateFromConsoleArgs ,
7
- } from '../../errors/hydration-error-info'
4
+ import { storeHydrationErrorStateFromConsoleArgs } from '../../errors/hydration-error-info'
8
5
import {
9
6
ACTION_BEFORE_REFRESH ,
10
7
ACTION_BUILD_ERROR ,
@@ -30,8 +27,7 @@ function handleError(error: unknown) {
30
27
31
28
attachHydrationErrorState ( error )
32
29
33
- const componentStackTrace =
34
- ( error as any ) . _componentStack || hydrationErrorState . componentStack
30
+ const componentStackTrace = ( error as any ) . _componentStack
35
31
const componentStackFrames =
36
32
typeof componentStackTrace === 'string'
37
33
? parseComponentStack ( componentStackTrace )
You can’t perform that action at this time.
0 commit comments