fix weird path context state by clearing the context before we visit it
This commit is contained in:
@@ -34,6 +34,8 @@ export default class TraversalContext {
|
||||
if (visited.indexOf(path.node) >= 0) continue;
|
||||
visited.push(path.node);
|
||||
|
||||
path.setContext(this.parentPath, this, path.key);
|
||||
|
||||
if (path.visit()) {
|
||||
stop = true;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user