mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
1e25c9da306f38ddf7bd3c63ed7c9540b75384e0#commitcomment-719177
This commit is contained in:
parent
1e25c9da30
commit
d0b8cded6b
3 changed files with 5 additions and 2 deletions
|
@ -23,7 +23,7 @@
|
|||
|
||||
Scope.prototype.add = function(name, type, immediate) {
|
||||
if (this.shared && !immediate) return this.parent.add(name, type, immediate);
|
||||
if (this.positions.hasOwnProperty(name)) {
|
||||
if (Object.prototype.hasOwnProperty.call(this.positions, name)) {
|
||||
return this.variables[this.positions[name]].type = type;
|
||||
} else {
|
||||
return this.positions[name] = this.variables.push({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue