don't consider "globals" to cause incompatible scope hoist

This commit is contained in:
Sebastian McKenzie
2015-05-13 12:33:08 +01:00
parent be2dfaf081
commit b0317f9bab

View File

@@ -16,11 +16,13 @@ var referenceVisitor = {
// eg. it's in a closure etc
if (bindingInfo !== state.scope.getBinding(node.name)) return;
if (bindingInfo && bindingInfo.constant) {
state.bindings[node.name] = bindingInfo;
} else {
state.foundIncompatible = true;
this.stop();
if (bindingInfo) {
if (bindingInfo.constant) {
state.bindings[node.name] = bindingInfo;
} else {
state.foundIncompatible = true;
this.stop();
}
}
}
}