Skip to content

Commit 7ff85b3

Browse files
Only clear children if they exist.
1 parent 0cb45c5 commit 7ff85b3

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/compiler/parser.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -469,8 +469,14 @@ module ts {
469469

470470
// Ditch any existing LS children we may have created. This way we can avoid
471471
// moving them forward.
472-
node._children = undefined;
473-
node._docComment = undefined;
472+
if (node._children) {
473+
node._children = undefined;
474+
}
475+
476+
if (node._docComment) {
477+
node._docComment = undefined;
478+
}
479+
474480
node.pos += delta;
475481
node.end += delta;
476482

0 commit comments

Comments
 (0)