Merge pull request babel/babel-eslint#50 from UltCombo/fix-48

acorn-to-esprima: fix ExportNamedDeclaration, closes babel/babel-eslint#48
This commit is contained in:
Sebastian McKenzie 2015-03-16 12:42:57 +11:00
parent 0d0cc6bb83
commit ce91f1869b

View File

@ -85,7 +85,7 @@ var astTransformVisitor = {
} else if (node.declaration.type === "ClassExpression") { } else if (node.declaration.type === "ClassExpression") {
node.declaration.type = "ClassDeclaration"; node.declaration.type = "ClassDeclaration";
} }
} else if (t.isExportBatchSpecifier(node.specifiers[0])) { } else if (node.specifiers && t.isExportBatchSpecifier(node.specifiers[0])) {
node.type = "ExportAllDeclaration"; node.type = "ExportAllDeclaration";
delete node.specifiers; delete node.specifiers;
delete node.declaration; delete node.declaration;