Removed unnecessary check

This commit is contained in:
matehat
2010-03-30 10:58:21 -04:00
parent 0557eb9b93
commit 1e786d6d8b
2 changed files with 2 additions and 2 deletions

View File

@@ -85,7 +85,7 @@
// Ensure that an assignment is made at the top of this scope
// (or at the top-level scope, if requested).
Scope.prototype.assign = function assign(name, value, top_level) {
if (top_level && this.parent) {
if (top_level) {
return this.topmost().assign(name, value);
}
this.variables[name] = {

View File

@@ -59,7 +59,7 @@ exports.Scope: class Scope
# Ensure that an assignment is made at the top of this scope
# (or at the top-level scope, if requested).
assign: (name, value, top_level) ->
return @topmost().assign(name, value) if top_level and @parent
return @topmost().assign(name, value) if top_level
@variables[name]: {value: value, assigned: true}
# Ensure the CoffeeScript utility object is included in the top level