Skip to content

Commit

Permalink
Remove unnnecesary ternary
Browse files Browse the repository at this point in the history
  • Loading branch information
sosukesuzuki committed Feb 12, 2021
1 parent afd2fb5 commit 15c8306
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/babel-parser/src/util/scope.js
Expand Up @@ -174,9 +174,7 @@ export default class ScopeHandler<IScope: Scope = Scope> {
}

checkLocalExport(id: N.Identifier) {
const currentScope = this.currentScope();
const scope =
currentScope.flags & SCOPE_PROGRAM ? currentScope : this.scopeStack[0];
const scope = this.currentScope();
if (
scope.lexical.indexOf(id.name) === -1 &&
scope.var.indexOf(id.name) === -1 &&
Expand Down

0 comments on commit 15c8306

Please sign in to comment.