Skip to content

Commit

Permalink
fix: with babel upgrade t.isValidES3Identifier of empty string return…
Browse files Browse the repository at this point in the history
…s true
  • Loading branch information
jodarove committed Apr 10, 2020
1 parent 652c4d3 commit a089973
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ function getGeneratedConfig(t, wiredValue) {
// In such cases where the param does not have proper notation, the config generated will use the bracket
// notation to match the current behavior (that most likely end up resolving that param as undefined).
const isInvalidMemberExpr = memberExprPaths.some(
maybeIdentifier => !t.isValidES3Identifier(maybeIdentifier)
maybeIdentifier =>
!(t.isValidES3Identifier(maybeIdentifier) && maybeIdentifier.length > 0)
);
const memberExprPropertyGen = !isInvalidMemberExpr ? t.identifier : t.StringLiteral;

Expand Down

0 comments on commit a089973

Please sign in to comment.