fix Program global reference catching

This commit is contained in:
Sebastian McKenzie 2015-05-01 09:40:03 +01:00
parent 005754ba98
commit 452d0ef30e

View File

@ -42,10 +42,8 @@ var programReferenceVisitor = {
enter(node, parent, scope, state) {
if (t.isReferencedIdentifier(node, parent)) {
var bindingInfo = scope.getBinding(node.name);
if (bindingInfo) {
state.addGlobal(node);
bindingInfo.reference();
}
if (bindingInfo) bindingInfo.reference();
state.addGlobal(node);
} else if (t.isLabeledStatement(node)) {
state.addGlobal(node);
} else if (t.isAssignmentExpression(node)) {