Skip to content

Commit

Permalink
Merge pull request jashkenas#2858 from paulmillr/patch-1
Browse files Browse the repository at this point in the history
Improve events performance in some cases by 20x.
  • Loading branch information
jashkenas committed Nov 7, 2013
2 parents 28d345a + 1a2d3f2 commit e4e349f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backbone.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
var retain, ev, events, names, i, l, j, k;
if (!this._events || !eventsApi(this, 'off', name, [callback, context])) return this;
if (!name && !callback && !context) {
this._events = {};
this._events = void 0;
return this;
}
names = name ? [name] : _.keys(this._events);
Expand Down

0 comments on commit e4e349f

Please sign in to comment.