From 37d40a03c1ca82bcb286a32dc767883abea0882e Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Wed, 28 Oct 2015 22:54:37 +0000 Subject: [PATCH] only explicitly add id when scope tracking function expressions - fixes #2617 --- packages/babel/src/traversal/scope/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/babel/src/traversal/scope/index.js b/packages/babel/src/traversal/scope/index.js index 478e5036ac..6ef5332745 100644 --- a/packages/babel/src/traversal/scope/index.js +++ b/packages/babel/src/traversal/scope/index.js @@ -699,7 +699,7 @@ export default class Scope { // FunctionExpression - id if (path.isFunctionExpression() && path.has("id")) { - this.registerBinding("local", path); + this.registerBinding("local", path.get("id")); } // Class