Skip to content

Commit b975a8b

Browse files
authored
Fix transform to use correct node start location in case of whitespace
1 parent 061a3fe commit b975a8b

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)