We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dcc2ab5 commit ce02b7eCopy full SHA for ce02b7e
packages/next/src/client/app-index.tsx
@@ -19,7 +19,10 @@ import { HMR_ACTIONS_SENT_TO_BROWSER } from '../server/dev/hot-reloader-types'
19
// Since React doesn't call onerror for errors caught in error boundaries.
20
const origConsoleError = window.console.error
21
window.console.error = (...args) => {
22
- if (isNextRouterError(args[0])) {
+ // in dev, the actual error is the second argument.
23
+ const error = process.env.NODE_ENV === 'development' ? args[1] : args[0]
24
+
25
+ if (isNextRouterError(error)) {
26
return
27
}
28
origConsoleError.apply(window.console, args)
0 commit comments