Skip to content

Commit

Permalink
refactor: else is redundant because keyName is const
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed Aug 5, 2020
1 parent 0a2c13d commit b70049c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/babel-parser/src/parser/expression.js
Expand Up @@ -1755,7 +1755,7 @@ export default class ExpressionParser extends LValParser {
}
// get PropertyName[?Yield, ?Await] () { FunctionBody[~Yield, ~Await] }
// set PropertyName[?Yield, ?Await] ( PropertySetParameterList ) { FunctionBody[~Yield, ~Await] }
else if (keyName === "get" || keyName === "set") {
if (keyName === "get" || keyName === "set") {
isAccessor = true;
isGenerator = this.eat(tt.star); // tt.star is allowed in `maybeAsyncOrAccessorProp`, we will throw in `parseObjectMethod` later
prop.kind = keyName;
Expand Down

0 comments on commit b70049c

Please sign in to comment.