From 909b19ad19e70fb536e9416463b939405134923c Mon Sep 17 00:00:00 2001 From: Kai Cataldo Date: Mon, 26 Sep 2016 01:36:52 -0400 Subject: [PATCH] Remove unnecessary check --- src/parser/statement.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/parser/statement.js b/src/parser/statement.js index b35c397a8e..ea0b0fa343 100644 --- a/src/parser/statement.js +++ b/src/parser/statement.js @@ -913,9 +913,7 @@ pp.checkExport = function (node, checkNames, isDefault) { } else if (node.specifiers && node.specifiers.length) { // Named exports for (let specifier of node.specifiers) { - const name = specifier.exported.name; - if (name === "default") isDefault = true; - this.checkDuplicateExports(specifier, name); + this.checkDuplicateExports(specifier, specifier.exported.name); } } else if (node.declaration) { // Exported declarations @@ -948,7 +946,7 @@ pp.checkDeclaration = function(node) { this.checkDeclaration(elem); } } else if (node.type === "ObjectProperty") { - this.checkDeclaration(node.value); + this.checkDeclaration(node.value); } else if (node.type === "Identifier") { this.checkDuplicateExports(node, node.name); }