File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -1349,15 +1349,16 @@ namespace ts {
1349
1349
const visited = visitEachChild ( node , getSynthesizedDeepClone , nullTransformationContext ) ;
1350
1350
if ( visited === node ) {
1351
1351
// This only happens for leaf nodes - internal nodes always see their children change.
1352
- return getSynthesizedClone ( node ) ;
1352
+ const clone = getSynthesizedClone ( node ) ;
1353
+ clone . pos = node . pos ;
1354
+ clone . end = node . end ;
1355
+ return clone ;
1353
1356
}
1354
1357
1355
1358
// PERF: As an optimization, rather than calling getSynthesizedClone, we'll update
1356
1359
// the new node created by visitEachChild with the extra changes getSynthesizedClone
1357
1360
// would have made.
1358
1361
1359
- visited . pos = - 1 ;
1360
- visited . end = - 1 ;
1361
1362
visited . parent = undefined ;
1362
1363
1363
1364
return visited ;
You can’t perform that action at this time.
0 commit comments