Skip to content

Commit a9f4cc9

Browse files
authored
Merge pull request #1 from ofersadgat/ofersadgat-patch-1
Fix transform to use correct node start location in case of whitespace
2 parents 061a3fe + b975a8b commit a9f4cc9

File tree

1 file changed

+1
-1
lines changed
  • packages/ts-morph/src/compiler/ast/common

1 file changed

+1
-1
lines changed

packages/ts-morph/src/compiler/ast/common/Node.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1553,7 +1553,7 @@ export class Node<NodeType extends ts.Node = ts.Node> {
15531553
if (oldNode === newNode && (newNode as any).emitNode == null)
15541554
return;
15551555

1556-
const start = oldNode.getStart(compilerSourceFile, true);
1556+
const start = oldNode.pos;
15571557
const end = oldNode.end;
15581558
let lastTransformation: Transformation | undefined;
15591559

0 commit comments

Comments
 (0)