Fix Emitter.once()

This commit is contained in:
Jürg Lehni 2018-11-28 11:40:17 +01:00
parent b1705f628b
commit d46b6cbef4

View file

@ -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);
});
},