From 2305e2447fd49161fa4a3412a22f48e9039bb5c7 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Wed, 7 Jan 2015 13:08:20 +1100 Subject: [PATCH] fix hasOwnProperty object lookup conflict --- lib/6to5/transformation/modules/_default.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/6to5/transformation/modules/_default.js b/lib/6to5/transformation/modules/_default.js index 64608d26d5..46c8b15af1 100644 --- a/lib/6to5/transformation/modules/_default.js +++ b/lib/6to5/transformation/modules/_default.js @@ -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) {