We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7dc8b15 commit a67f4e7Copy full SHA for a67f4e7
1 file changed
lib/internal/modules/cjs/loader.js
@@ -56,7 +56,6 @@ const {
56
StringPrototypeCharCodeAt,
57
StringPrototypeEndsWith,
58
StringPrototypeIndexOf,
59
- StringPrototypeLastIndexOf,
60
StringPrototypeRepeat,
61
StringPrototypeSlice,
62
StringPrototypeSplit,
@@ -1650,8 +1649,8 @@ function loadTS(module, filename) {
1650
1649
1651
function reconstructErrorStack(err, parentPath, parentSource) {
1652
const errLine = StringPrototypeSplit(
1653
- StringPrototypeSlice(err.stack, StringPrototypeLastIndexOf(
1654
- err.stack, ' at ')), '\n', 1)[0];
+ StringPrototypeSlice(err.stack, StringPrototypeIndexOf(
+ err.stack, ' at ')), '\n', 2)[1];
1655
const { 1: line, 2: col } =
1656
RegExpPrototypeExec(/(\d+):(\d+)\)/, errLine) || [];
1657
if (line && col) {
0 commit comments