diff --git a/packages/next/src/server/patch-error-inspect.ts b/packages/next/src/server/patch-error-inspect.ts index a89ed1bde88d8..6d85dd186cbb0 100644 --- a/packages/next/src/server/patch-error-inspect.ts +++ b/packages/next/src/server/patch-error-inspect.ts @@ -157,7 +157,7 @@ function parseAndSourceMap(error: Error): string { if ( process.env.NODE_ENV !== 'production' && sourcemappedFrame.code !== null && - sourceFrameDEV !== null + sourceFrameDEV === null ) { sourceFrameDEV = sourcemappedFrame.code }