diff --git a/src/babel/traversal/path.js b/src/babel/traversal/path.js index e7f42143d7..8456065d2b 100644 --- a/src/babel/traversal/path.js +++ b/src/babel/traversal/path.js @@ -57,9 +57,8 @@ export default class TraversalPath { } setContext(parentPath, context, key) { - this.shouldRemove = false; - this.shouldSkip = false; - this.shouldStop = false; + this.shouldSkip = false; + this.shouldStop = false; this.parentPath = parentPath || this.parentPath; this.context = context; @@ -71,11 +70,6 @@ export default class TraversalPath { } remove() { - this.shouldRemove = true; - this.shouldSkip = true; - } - - _remove() { this._refresh(this.node, []); this.container[this.key] = null; this.flatten(); @@ -159,10 +153,6 @@ export default class TraversalPath { if (replacement) { this.node = replacement; } - - if (this.shouldRemove) { - this._remove(); - } } isBlacklisted() {