remove parentPath existence check
This commit is contained in:
parent
bf811ea34a
commit
c07704cc80
@ -5,7 +5,7 @@ import * as t from "../types";
|
||||
export default function traverse(parent, opts, scope, state, parentPath) {
|
||||
if (!parent) return;
|
||||
|
||||
if (!opts.noScope && (!scope || !parentPath)) {
|
||||
if (!opts.noScope && !scope) {
|
||||
if (parent.type !== "Program" && parent.type !== "File") {
|
||||
throw new Error(`Must pass a scope and parentPath unless traversing a Program/File got a ${parent.type} node`);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user