Don't do the duplicate check if not an identifier (#140)

This commit is contained in:
Henry Zhu
2016-09-23 00:44:13 -04:00
committed by GitHub
parent 101e9e5636
commit 1d04d12794
3 changed files with 317 additions and 1 deletions

View File

@@ -923,7 +923,9 @@ pp.checkExport = function (node, checkNames, isDefault) {
this.checkDuplicateExports(node, node.declaration.id.name, isDefault);
} else if (node.declaration.type === "VariableDeclaration") {
for (let declaration of node.declaration.declarations) {
this.checkDuplicateExports(declaration, declaration.id.name, isDefault);
if (declaration.id.name) {
this.checkDuplicateExports(declaration, declaration.id.name, isDefault);
}
}
}
}