don't override core supported member expressions if there's a local binding

This commit is contained in:
Sebastian McKenzie
2015-02-05 09:53:12 +11:00
parent 58db94401e
commit 386e221a0f

View File

@@ -30,7 +30,7 @@ var astVisitor = {
if (!t.isReferenced(obj, node)) return;
if (!node.computed && coreHas(obj) && has(core[obj.name], prop.name)) {
if (!node.computed && coreHas(obj) && has(core[obj.name], prop.name) && !scope.getBinding(obj.name)) {
context.skip();
return t.prependToMemberExpression(node, file.get("coreIdentifier"));
}