mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-08-14 15:08:53 -04:00
Fix Emitter.once()
This commit is contained in:
parent
b1705f628b
commit
d46b6cbef4
1 changed files with 2 additions and 2 deletions
|
@ -68,9 +68,9 @@ var Emitter = {
|
|||
},
|
||||
|
||||
once: function(type, func) {
|
||||
return this.on(type, function() {
|
||||
return this.on(type, function handler() {
|
||||
func.apply(this, arguments);
|
||||
this.off(type, func);
|
||||
this.off(type, handler);
|
||||
});
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue