Skip to content

Commit

Permalink
Use .has instead of .get where possible
Browse files Browse the repository at this point in the history
  • Loading branch information
overlookmotel committed Jun 22, 2021
1 parent 20333fc commit f76a694
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -358,13 +358,13 @@ const rewriteReferencesVisitor: Visitor<RewriteReferencesVisitorState> = {
const loopBodyScope = path.get("body").scope;
for (const name of Object.keys(t.getOuterBindingIdentifiers(left))) {
if (programScope.getBinding(name) === scope.getBinding(name)) {
if (exported.get(name)) {
if (exported.has(name)) {
didTransformExport = true;
if (loopBodyScope.hasOwnBinding(name)) {
loopBodyScope.rename(name);
}
}
if (imported.get(name) && !importConstViolationName) {
if (imported.has(name) && !importConstViolationName) {
importConstViolationName = name;
}
}
Expand Down

0 comments on commit f76a694

Please sign in to comment.