Skip to content

Commit 0a7b86d

Browse files
committed
Simplify filterStackFrame
1 parent 5928a9e commit 0a7b86d

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

packages/next/src/server/lib/source-maps.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -122,15 +122,7 @@ export function filterStackFrameDEV(
122122
// built-in Components in parent stacks don't have source location.
123123
// Filter out frames that show up in Promises to get good names in React's
124124
// Server Request track until we come up with a better heuristic.
125-
return (
126-
functionName !== 'new Promise' &&
127-
functionName !== 'Promise.then' &&
128-
functionName !== 'Promise.catch' &&
129-
functionName !== 'Promise.finally' &&
130-
functionName !== 'Function.withResolvers' &&
131-
functionName !== 'Function.all' &&
132-
functionName !== 'Function.allSettled'
133-
)
125+
return functionName !== 'new Promise'
134126
}
135127
if (sourceURL.startsWith('node:') || sourceURL.includes('node_modules')) {
136128
return false

test/e2e/app-dir/server-source-maps/server-source-maps.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,8 @@ describe('app-dir - server source maps', () => {
501501
"<FIXME-file-protocol>",
502502
"eval rsc:/Prerender/webpack-internal:///(rsc)/app/module-evaluation/page.js (5:65)",
503503
"<FIXME-file-protocol>",
504+
"Function.all <anonymous>",
505+
"Function.all <anonymous>",
504506
"Page <anonymous>",
505507
],
506508
}

0 commit comments

Comments
 (0)