Merge pull request #2993 from amasad/2772

Fix #2772
This commit is contained in:
Sebastian McKenzie 2015-11-11 14:11:58 -08:00
commit a05330b2e5
2 changed files with 3 additions and 2 deletions

View File

@ -1,7 +1,8 @@
var code = multiline([
"(function() {",
" var bar = 'lol';",
" function foo(b){",
' b === "lol";',
" b === bar;",
" foo(b);",
" }",
"})();",

View File

@ -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);