| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 5f1a59c commit cedd26a
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -89,12 +89,12 @@ const prepareStackTrace = (globalThis, error, trace) => { | |||
| 89 | 89 | // Construct call site name based on: v8.dev/docs/stack-trace-api: | |
| 90 | 90 | const fnName = t.getFunctionName() ?? t.getMethodName(); | |
| 91 | 91 | const originalName = `${t.getTypeName() !== 'global' ? | |
| 92 | - `${t.getTypeName()}.` : ''}${fnName ? fnName : '<anonymous>'}`; | ||
| 92 | + `${t.getTypeName()}.` : ''}${fnName || '<anonymous>'}`; | ||
| 93 | 93 | // The original call site may have a different symbol name | |
| 94 | 94 | // associated with it, use it: | |
| 95 | 95 | const prefix = (name && name !== originalName) ? | |
| 96 | 96 | `${name}` : | |
| 97 | - `${originalName ? originalName : ''}`; | ||
| 97 | + `${originalName}`; | ||
| 98 | 98 | const hasName = !!(name || originalName); | |
| 99 | 99 | const originalSourceNoScheme = | |
| 100 | 100 | StringPrototypeStartsWith(originalSource, 'file://') ? | |
@@ -160,7 +160,7 @@ function getErrorSource( | |||
| 160 | 160 | let prefix = ''; | |
| 161 | 161 | for (const character of new SafeStringIterator( | |
| 162 | 162 | StringPrototypeSlice(line, 0, originalColumn + 1))) { | |
| 163 | - prefix += (character === '\t') ? '\t' : | ||
| 163 | + prefix += character === '\t' ? '\t' : | ||
| 164 | 164 | StringPrototypeRepeat(' ', getStringWidth(character)); | |
| 165 | 165 | } | |
| 166 | 166 | prefix = StringPrototypeSlice(prefix, 0, -1); // The last character is '^'. | |
| Back | FazBrowse Home | New Git URL |
0 commit comments