aboutsummaryrefslogtreecommitdiff
path: root/lib/scope.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/scope.js')
-rw-r--r--lib/scope.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/scope.js b/lib/scope.js
index ea43f752..82a935a2 100644
--- a/lib/scope.js
+++ b/lib/scope.js
@@ -197,11 +197,10 @@ AST_Toplevel.DEFMETHOD("figure_out_scope", function(options){
}
}
var sym = node.scope.find_variable(name);
- if (node.scope instanceof AST_Lambda && name == "arguments") {
- node.scope.uses_arguments = true;
- }
if (!sym) {
sym = self.def_global(node);
+ } else if (sym.scope instanceof AST_Lambda && name == "arguments") {
+ sym.scope.uses_arguments = true;
}
node.thedef = sym;
node.reference(options);