remove no self node replacement error

This commit is contained in:
Sebastian McKenzie 2015-05-05 00:13:07 +01:00
parent f4b9faa6b3
commit 3289b33806

View File

@ -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