File tree 1 file changed +0
-21
lines changed
packages/next/src/client/components/react-dev-overlay/pages
1 file changed +0
-21
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ import { attachHydrationErrorState } from '../../errors/attach-hydration-error-s
21
21
import type { DevIndicatorServerState } from '../../../../server/dev/dev-indicator-server-state'
22
22
23
23
let isRegistered = false
24
- let stackTraceLimit : number | undefined = undefined
25
24
26
25
function handleError ( error : unknown ) {
27
26
if ( ! error || ! ( error instanceof Error ) || typeof error . stack !== 'string' ) {
@@ -93,34 +92,14 @@ export function register() {
93
92
isRegistered = true
94
93
95
94
try {
96
- const limit = Error . stackTraceLimit
97
95
Error . stackTraceLimit = 50
98
- stackTraceLimit = limit
99
96
} catch { }
100
97
101
98
window . addEventListener ( 'error' , onUnhandledError )
102
99
window . addEventListener ( 'unhandledrejection' , onUnhandledRejection )
103
100
window . console . error = nextJsHandleConsoleError
104
101
}
105
102
106
- export function unregister ( ) {
107
- if ( ! isRegistered ) {
108
- return
109
- }
110
- isRegistered = false
111
-
112
- if ( stackTraceLimit !== undefined ) {
113
- try {
114
- Error . stackTraceLimit = stackTraceLimit
115
- } catch { }
116
- stackTraceLimit = undefined
117
- }
118
-
119
- window . removeEventListener ( 'error' , onUnhandledError )
120
- window . removeEventListener ( 'unhandledrejection' , onUnhandledRejection )
121
- window . console . error = origConsoleError
122
- }
123
-
124
103
export function onBuildOk ( ) {
125
104
Bus . emit ( { type : ACTION_BUILD_OK } )
126
105
}
You can’t perform that action at this time.
0 commit comments