fix hasOwnProperty object lookup conflict

This commit is contained in:
Sebastian McKenzie
2015-01-07 13:08:20 +11:00
parent c420d1ffc3
commit 2305e2447f

View File

@@ -52,8 +52,7 @@ DefaultFormatter.prototype.checkCollisions = function () {
var file = this.file;
var isLocalReference = function (node, scope) {
var localImport = localImports[node.name];
return t.isIdentifier(node) && localImport && localImport !== node;
return t.isIdentifier(node) && _.has(localImports, node.name) && localImports[node.name] !== node;
};
var check = function (node) {