fix let scoping unneccesary override - fixes #245

This commit is contained in:
Sebastian McKenzie
2014-12-05 09:55:26 +11:00
parent b9266b0c4c
commit a0219ef278
3 changed files with 6 additions and 2 deletions

View File

@@ -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 () {

View File

@@ -162,7 +162,7 @@ t.toIdentifier = function (name) {
return c ? c.toUpperCase() : "";
});
return name;
return name || '_';
};
t.isValidIdentifier = function (name) {