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 ac0d75d commit 3572342Copy full SHA for 3572342
lib/worker/line-numbers.js
@@ -66,6 +66,13 @@ const translate = (sourceMap, pos) => {
66
}
67
68
const entry = sourceMap.findEntry(pos.line - 1, pos.column); // Source maps are 0-based
69
+
70
+ // When used with ts-node/register, we've seen entries without original values. Return the
71
+ // original position.
72
+ if (entry.originalLine === undefined || entry.originalColumn === undefined) {
73
+ return pos;
74
+ }
75
76
return {
77
line: entry.originalLine + 1, // Readjust for Acorn.
78
column: entry.originalColumn,
0 commit comments