From 3289b3380699a255e07fdbf96510df893ea38e45 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Tue, 5 May 2015 00:13:07 +0100 Subject: [PATCH] remove no self node replacement error --- src/babel/traversal/path/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/babel/traversal/path/index.js b/src/babel/traversal/path/index.js index 4191cfee04..f65bddd89d 100644 --- a/src/babel/traversal/path/index.js +++ b/src/babel/traversal/path/index.js @@ -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