From c07704cc80525f6d9df14d448c064d39132a446b Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Fri, 3 Apr 2015 06:48:46 +1100 Subject: [PATCH] remove parentPath existence check --- src/babel/traversal/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/babel/traversal/index.js b/src/babel/traversal/index.js index ffeebb7b86..dd095707e2 100644 --- a/src/babel/traversal/index.js +++ b/src/babel/traversal/index.js @@ -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`); }