File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
packages/react-server/src Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -204,17 +204,17 @@ function findCalledFunctionNameFromStackTrace(
204204 const callsite = stack [ i ] ;
205205 const functionName = callsite [ 0 ] ;
206206 const url = devirtualizeURL ( callsite [ 1 ] ) ;
207- if ( filterStackFrame ( url , functionName ) ) {
207+ if ( functionName === 'new Promise' ) {
208+ // Ignore Promise constructors.
209+ } else if ( url === 'node:internal/async_hooks' ) {
210+ // Ignore the stack frames from the async hooks themselves.
211+ } else if ( filterStackFrame ( url , functionName ) ) {
208212 if ( bestMatch === '' ) {
209213 // If we had no good stack frames for internal calls, just use the last
210214 // first party function name.
211215 return functionName ;
212216 }
213217 return bestMatch ;
214- } else if ( functionName === 'new Promise' ) {
215- // Ignore Promise constructors.
216- } else if ( url === 'node:internal/async_hooks' ) {
217- // Ignore the stack frames from the async hooks themselves.
218218 } else {
219219 bestMatch = functionName ;
220220 }
You can’t perform that action at this time.
0 commit comments