6to5-core
Advanced tools
Comparing version 2.12.1 to 2.12.2
@@ -48,3 +48,3 @@ var traverse = require("../../traverse"); | ||
// we're accessing a variable that's already defined within this function | ||
var has = scope.get(param.name); | ||
var has = scope.get(param.name, true); | ||
if (has && node.params.indexOf(has) < 0) { | ||
@@ -51,0 +51,0 @@ iife = true; |
@@ -196,2 +196,13 @@ var esutils = require("esutils"); | ||
if (t.isFunction(parent)) { | ||
// we're a function param | ||
if (_.contains(parent.params, node)) return false; | ||
// we're a rest parameter | ||
if (_.contains(parent.params, node)) return false; | ||
} | ||
// we're a catch clause param | ||
if (t.isCatchClause(parent) && parent.param === node) return false; | ||
// we're a variable declarator id so we aren't referenced | ||
@@ -198,0 +209,0 @@ if (t.isVariableDeclarator(parent) && parent.id === node) return false; |
{ | ||
"name": "6to5-core", | ||
"description": "Turn ES6 code into readable vanilla ES5 with source maps", | ||
"version": "2.12.1", | ||
"version": "2.12.2", | ||
"author": "Sebastian McKenzie <sebmck@gmail.com>", | ||
@@ -6,0 +6,0 @@ "homepage": "https://github.com/6to5/6to5", |
Sorry, the diff of this file is too big to display
3958458
16917