| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 589a8d4 commit 3436da1
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -537,8 +537,7 @@ function reconstructCallSite(callSite) { | |||
| 537 | 537 | if (!entry?.originalSource) return; | |
| 538 | 538 | return { | |
| 539 | 539 | __proto__: null, | |
| 540 | - // If the name is not found, it is an empty string to match the behavior of `util.getCallSite()` | ||
| 541 | - functionName: entry.name ?? '', | ||
| 540 | + functionName: entry.name || callSite.functionName, | ||
| 542 | 541 | scriptName: entry.originalSource, | |
| 543 | 542 | lineNumber: entry.originalLine + 1, | |
| 544 | 543 | column: entry.originalColumn + 1, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,7 @@ | |||
| 1 | + { | ||
| 2 | + "version": 3, | ||
| 3 | + "sources": ["get-call-sites-function-name-original.js"], | ||
| 4 | + "sourcesContent": ["const { getCallSites } = require('node:util'); function foo() { process.stdout.write(JSON.stringify(getCallSites({ sourceMap: true })[0])); } foo();"], | ||
| 5 | + "mappings": "AAAA,KAAM,CAAE,YAAa,EAAI,QAAQ,WAAW,EAAG,SAAS,KAAM,CAAE,QAAQ,OAAO,MAAM,KAAK,UAAU,aAAa,CAAE,UAAW,EAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAG,CAAE,IAAI", | ||
| 6 | + "names": [] | ||
| 7 | + } | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments