Skip to content

Commit 021c63f

Browse files
committed
Use the SourceMapSource to get line and column instead of current source file
Fixes #29300
1 parent b23664a commit 021c63f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/compiler/emitter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4389,7 +4389,7 @@ namespace ts {
43894389
return;
43904390
}
43914391

4392-
const { line: sourceLine, character: sourceCharacter } = getLineAndCharacterOfPosition(currentSourceFile!, pos);
4392+
const { line: sourceLine, character: sourceCharacter } = getLineAndCharacterOfPosition(sourceMapSource, pos);
43934393
sourceMapGenerator!.addMapping(
43944394
writer.getLine(),
43954395
writer.getColumn(),

tests/baselines/reference/customTransforms/sourceMapExternalSourceFiles.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)