diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c7f7ef26b..247ff77e52 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 1.14.1 + + * Fix let scoping unneccesary override. + # 1.14.6 * Avoid ensuring a block on non-array node replacements. diff --git a/lib/6to5/traverse/scope.js b/lib/6to5/traverse/scope.js index 9666edafa3..98cf4f1710 100644 --- a/lib/6to5/traverse/scope.js +++ b/lib/6to5/traverse/scope.js @@ -23,7 +23,7 @@ function Scope(block, parent) { Scope.add = function (node, references) { if (!node) return; - _.merge(references, t.getIds(node, true)); + _.defaults(references, t.getIds(node, true)); }; Scope.prototype.getReferences = function () { diff --git a/lib/6to5/types/index.js b/lib/6to5/types/index.js index 931cfa0ebb..f741debaff 100644 --- a/lib/6to5/types/index.js +++ b/lib/6to5/types/index.js @@ -162,7 +162,7 @@ t.toIdentifier = function (name) { return c ? c.toUpperCase() : ""; }); - return name; + return name || '_'; }; t.isValidIdentifier = function (name) {