Skip to content

Commit 21020a7

Browse files
committed
Use local source file text to record source map span start
1 parent b53e989 commit 21020a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/emitter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ module ts {
345345

346346
function recordEmitNodeStartSpan(node: Node) {
347347
// Get the token pos after skipping to the token (ignoring the leading trivia)
348-
recordSourceMapSpan(ts.getTokenPosOfNode(node));
348+
recordSourceMapSpan(skipTrivia(currentSourceFile.text, node.pos));
349349
}
350350

351351
function recordEmitNodeEndSpan(node: Node) {

0 commit comments

Comments
 (0)