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) {
_.each(this.options.listeners, function (lis, eventName) {
if (_.isFunction(lis)) {
self.on(eventName, _.bind(lis, self));
self.on(eventName, lis);
return;
}
(lis.target ? lis.target : self)[lis.once ? "once" : "on"]
(lis.eventName, _.bind(lis.action, self));
(lis.target ? lis.target : self)[lis.once ? "once" : "on"](lis.eventName, lis.action);
});
delete this.options.listeners;
}

Loading…
Cancel
Save