diff --git a/lib/6to5/traverse/scope.js b/lib/6to5/traverse/scope.js index fe0097fc79..5143b9bfba 100644 --- a/lib/6to5/traverse/scope.js +++ b/lib/6to5/traverse/scope.js @@ -387,8 +387,11 @@ Scope.prototype.parentGet = function (id, decl) { */ Scope.prototype.has = function (id, decl) { - return (id && (this.hasOwn(id, decl) || this.parentHas(id, decl))) || - contains(Scope.defaultDeclarations, id); + if (!id) return false; + if (this.hasOwn(id, decl)) return true; + if (this.parentHas(id, decl)) return true; + if (contains(Scope.defaultDeclarations, id)) return true; + return false; }; /**