guy 3 years ago
parent
commit
8064bfa49c
  1. 5
      src/core/3.ob.js

5
src/core/3.ob.js

@ -64,11 +64,10 @@
if (this.options.listeners != null) { if (this.options.listeners != null) {
_.each(this.options.listeners, function (lis, eventName) { _.each(this.options.listeners, function (lis, eventName) {
if (_.isFunction(lis)) { if (_.isFunction(lis)) {
self.on(eventName, _.bind(lis, self)); self.on(eventName, lis);
return; return;
} }
(lis.target ? lis.target : self)[lis.once ? "once" : "on"] (lis.target ? lis.target : self)[lis.once ? "once" : "on"](lis.eventName, lis.action);
(lis.eventName, _.bind(lis.action, self));
}); });
delete this.options.listeners; delete this.options.listeners;
} }

Loading…
Cancel
Save