We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c126733 commit fb85107Copy full SHA for fb85107
packages/ts-morph/src/manipulation/nodeHandlers/RangeHandler.ts
@@ -56,7 +56,7 @@ export class RangeHandler implements NodeHandler {
56
newNodeChildren.next();
57
58
// handle the rest
59
- while (!currentNodeChildren.done)
+ while (!currentNodeChildren.done && !newNodeChildren.done)
60
this.straightReplace(currentNodeChildren.next(), newNodeChildren.next(), newSourceFile);
61
62
// ensure the new children iterator is done too
0 commit comments