From 669b4bb6e73f528f63c2fb7d0d29d70c56957473 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hu=C3=A1ng=20J=C3=B9nli=C3=A0ng?= Date: Tue, 14 Jun 2022 13:59:04 -0400 Subject: [PATCH] fix flow error --- packages/babel-parser/src/parser/statement.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/babel-parser/src/parser/statement.js b/packages/babel-parser/src/parser/statement.js index eb113b722c3d..6ab4c73daa37 100644 --- a/packages/babel-parser/src/parser/statement.js +++ b/packages/babel-parser/src/parser/statement.js @@ -2425,11 +2425,9 @@ export default class StatementParser extends ExpressionParser { | N.ExportNamedDeclaration | N.ImportDeclaration, ) { - if (this.isJSONModuleImport(node)) { + if (this.isJSONModuleImport(node) && node.type !== "ExportAllDeclaration") { const { specifiers } = node; - if (specifiers == null) { - // ExportAllDeclaration - } else { + if (node.specifiers != null) { const nonDefaultNamedSpecifier = specifiers.find(specifier => { let imported; if (specifier.type === "ExportSpecifier") {