summaryrefslogtreecommitdiff
path: root/node_modules/@babel/helpers/lib/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/@babel/helpers/lib/index.js')
-rw-r--r--node_modules/@babel/helpers/lib/index.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/node_modules/@babel/helpers/lib/index.js b/node_modules/@babel/helpers/lib/index.js
index 711eb5f3..ec9b886d 100644
--- a/node_modules/@babel/helpers/lib/index.js
+++ b/node_modules/@babel/helpers/lib/index.js
@@ -82,7 +82,9 @@ function getHelperMetadata(file) {
const name = child.node.name;
const binding = child.scope.getBinding(name);
if (!binding) {
- globals.add(name);
+ if (name !== "arguments" || child.scope.path.isProgram()) {
+ globals.add(name);
+ }
} else if (dependencies.has(binding.identifier)) {
importBindingsReferences.push(makePath(child));
}