Don't add params of anonymous exported function decls to the outer scope (#9613)

* Don't add params of anonymous exported function decls to the outer scope

* Test
This commit is contained in:
Nicolò Ribaudo
2019-03-01 00:09:49 +01:00
committed by GitHub
parent 17f4195bcc
commit f195daa092
5 changed files with 20 additions and 5 deletions

View File

@@ -49,10 +49,7 @@ export default function splitExportDeclaration(exportDeclaration) {
exportDeclaration.replaceWith(updatedDeclaration);
if (needBindingRegistration) {
scope.registerBinding(
isClassDeclaration ? "let" : "var",
exportDeclaration,
);
scope.registerDeclaration(exportDeclaration);
}
return exportDeclaration;