[Pkg-javascript-commits] [backbone] 103/281: Return the jquery object for el when this.$ is called without argument

Jonas Smedegaard js at moszumanska.debian.org
Sat May 3 17:02:01 UTC 2014


This is an automated email from the git hooks/post-receive script.

js pushed a commit to tag 0.9.0
in repository backbone.

commit 2d2198c354a6fb137ac5fb5799a6fdd474792274
Author: TMaYaD <TMaYaD+github at gmail.com>
Date:   Thu Nov 24 02:38:08 2011 +0530

    Return the jquery object for el when this.$ is called without argument
---
 backbone.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/backbone.js b/backbone.js
index ade9db6..2c0774a 100644
--- a/backbone.js
+++ b/backbone.js
@@ -913,7 +913,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`.

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/backbone.git



More information about the Pkg-javascript-commits mailing list