mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-05-03 03:00:14 -04:00
Removed unnecessary check
This commit is contained in:
@@ -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] = {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user