Skip to content

Commit ceb417c

Browse files
committed
fix prod log
1 parent 8ddee8e commit ceb417c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/next/src/server/app-render/create-error-handler.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,11 @@ export function createErrorHandler({
117117
// The error logger is currently not provided in the edge runtime.
118118
// Use the exposed `__next_log_error__` instead.
119119
// This will trace error traces to the original source code.
120+
120121
if (typeof __next_log_error__ === 'function') {
121122
__next_log_error__(err)
123+
} else if (!dev) {
124+
console.error(err)
122125
}
123126
onReactStreamRenderError?.(err)
124127
}

0 commit comments

Comments
 (0)