Skip to content

Commit 2bc3bc9

Browse files
committed
More minor improvements
1 parent 0ea2155 commit 2bc3bc9

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

packages/node/src/stack-parser.ts

+3-6
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,12 @@ const mainModule: string = `${
55
}/`;
66

77
/** Gets the module */
8-
function getModule(filename: string | undefined, base?: string): string | undefined {
8+
function getModule(filename: string | undefined): string | undefined {
99
if (!filename) {
1010
return;
1111
}
1212

13-
if (!base) {
14-
// eslint-disable-next-line no-param-reassign
15-
base = mainModule;
16-
}
13+
const base = mainModule;
1714

1815
// It's specifically a module
1916
const file = basename(filename, '.js');
@@ -113,7 +110,7 @@ export const node: StackLineParser = (line: string) => {
113110
const in_app = !isInternal && filename !== undefined && !filename.includes('node_modules/');
114111

115112
return {
116-
filename: lineMatch[2],
113+
filename,
117114
module: getModule(filename),
118115
function: fn,
119116
lineno: parseInt(lineMatch[3], 10) || undefined,

0 commit comments

Comments
 (0)