Skip to content

Commit d5f62dd

Browse files
committed
Simplify filterStackFrame
1 parent 5928a9e commit d5f62dd

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-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

0 commit comments

Comments
 (0)