Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/TMaYaD/backbone
Browse files Browse the repository at this point in the history
  • Loading branch information
jashkenas committed Nov 23, 2011
2 parents 6687cde + 2d2198c commit 43c815a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion backbone.js
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,11 @@
// This should be prefered to global lookups, if you're dealing with
// a specific view.
var selectorDelegate = function(selector) {
return $(selector, this.el);
if (typeof selector == 'undefined') {
return $(this.el);
} else {
return $(selector, this.el);
};
};

// Cached regex to split keys for `delegate`.
Expand Down

0 comments on commit 43c815a

Please sign in to comment.