Yeah, that wouldn't be good to happen, but..

This commit is contained in:
Zixaphir 2014-01-08 12:02:08 -07:00
parent 5785f9cda3
commit c28d455225
3 changed files with 8 additions and 0 deletions

View File

@ -820,6 +820,9 @@
Callbacks.prototype.push = function(_arg) {
var cb, name;
name = _arg.name, cb = _arg.cb;
if (this[name]) {
this.rm(name);
}
this[name] = cb;
return this.keys.push(name);
};

View File

@ -825,6 +825,9 @@
Callbacks.prototype.push = function(_arg) {
var cb, name;
name = _arg.name, cb = _arg.cb;
if (this[name]) {
this.rm(name);
}
this[name] = cb;
return this.keys.push(name);
};

View File

@ -3,6 +3,8 @@ class Callbacks
@keys = []
push: ({name, cb}) ->
@rm name if @[name]
@[name] = cb
@keys.push name