We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ac3e68e commit e65f9b7Copy full SHA for e65f9b7
1 file changed
rewrite-javascript/rewrite/src/javascript/templating/engine.ts
@@ -699,9 +699,6 @@ export class TemplateApplier {
699
}
700
701
private wrapTree(originalTree: J, resultToUse: J) {
702
- if (this.cursor && (!("parentTree" in this.cursor) || typeof this.cursor?.parentTree !== "function")) {
703
- throw new Error("Wrong cursor: " + JSON.stringify(this.cursor) + " when visiting " + JSON.stringify(originalTree));
704
- }
705
const parentTree = this.cursor?.parentTree()?.value;
706
707
// Only apply wrapping logic if we have parent context
0 commit comments