From 46d8241caf1055da64b61794720caea38939ebed Mon Sep 17 00:00:00 2001 From: Amjad Masad Date: Wed, 11 Nov 2015 13:30:45 -0800 Subject: [PATCH] Use node for parent check --- packages/babel-traverse/src/path/introspection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/babel-traverse/src/path/introspection.js b/packages/babel-traverse/src/path/introspection.js index 1163642d0e..cda82f81cc 100644 --- a/packages/babel-traverse/src/path/introspection.js +++ b/packages/babel-traverse/src/path/introspection.js @@ -313,7 +313,7 @@ export function _guessExecutionStatusRelativeToDifferentFunctions(targetFuncPare for (let path of referencePaths) { // if a reference is a child of the function we're checking against then we can // safelty ignore it - let childOfFunction = !!path.find(path => path === targetFuncPath); + let childOfFunction = !!path.find(path => path.node === targetFuncPath.node); if (childOfFunction) continue; let status = this._guessExecutionStatusRelativeTo(path);