Skip to content

Commit

Permalink
Return this from #listenTo
Browse files Browse the repository at this point in the history
  • Loading branch information
jridgewell authored and akre54 committed Nov 3, 2014
1 parent 83c0b38 commit 7bf1f2a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backbone.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,8 @@
var id = obj._listenId || (obj._listenId = _.uniqueId('l'));
listeningTo[id] = obj;
if (!callback && typeof name === 'object') callback = this;
return obj.on(name, callback, this);
obj.on(name, callback, this);
return this;
};

Events.listenToOnce = function(obj, name, callback) {
Expand Down

0 comments on commit 7bf1f2a

Please sign in to comment.