remove no self node replacement error
This commit is contained in:
parent
f4b9faa6b3
commit
3289b33806
@ -510,7 +510,7 @@ export default class TraversalPath {
|
||||
}
|
||||
|
||||
if (this.node === replacement) {
|
||||
throw new Error("You're trying to replace a node with itself which doesn't make any sense. If you're trying to do a transformer recache then use `this.checkSelf()`");
|
||||
return this.checkSelf();
|
||||
}
|
||||
|
||||
// normalise inserting an entire AST
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user