Skip to content

Commit

Permalink
fix flow errors
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed Sep 30, 2020
1 parent 6334c8d commit 6f141a2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/babel-parser/src/parser/statement.js
Expand Up @@ -1940,12 +1940,13 @@ export default class StatementParser extends ExpressionParser {
} else if (node.specifiers && node.specifiers.length) {
// Named exports
for (const specifier of node.specifiers) {
const { exported, local } = specifier;
const { exported } = specifier;
const exportedName =
exported.type === "Identifier" ? exported.name : exported.value;
this.checkDuplicateExports(specifier, exportedName);
// $FlowIgnore
if (!isFrom && local) {
if (!isFrom && specifier.local) {
const { local } = specifier;
if (local.type === "StringLiteral") {
this.raise(
specifier.start,
Expand Down

0 comments on commit 6f141a2

Please sign in to comment.