Skip to content

Commit

Permalink
Restore fileName to anonymous function names (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
jwatzman authored Jun 11, 2024
1 parent e2d157c commit 3ebe94f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/utils/process-profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ function adjustCwdPaths(profile: Profile): void {
const functionName: string | undefined =
profile.stringTable.strings[Number(contextFunction.name)]

if (!(functionName?.includes(':') ?? false)) {
if (
!functionName?.includes(':') ||
functionName?.startsWith('(anonymous')
) {
const fileName: string = profile.stringTable.strings[
Number(contextFunction.filename)
] as string
Expand Down

0 comments on commit 3ebe94f

Please sign in to comment.