]> source.dussan.org Git - jquery.git/commitdiff
Fix #14190: Remove unnecessary assignment in .closest. Close gh-1411.
authorMarian Sollmann <marian.sollmann@cargomedia.ch>
Mon, 28 Oct 2013 14:31:58 +0000 (15:31 +0100)
committerRichard Gibson <richard.gibson@gmail.com>
Wed, 6 Nov 2013 15:37:06 +0000 (10:37 -0500)
(cherry picked from commit 346b031af9e3b315ef351a9cc7fee56f930cf346)

Conflicts:

src/traversing.js

src/traversing.js

index 4e55c8257569f08290624ade7e5f57bf581697e8..e3fc5cfa2776587545c7d14c19929ff7172cf5a9 100644 (file)
@@ -65,7 +65,7 @@ jQuery.fn.extend({
                        i = 0,
                        l = this.length,
                        matched = [],
-                       pos = ( rneedsContext.test( selectors ) || typeof selectors !== "string" ) ?
+                       pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?
                                jQuery( selectors, context || this.context ) :
                                0;
 
@@ -79,7 +79,7 @@ jQuery.fn.extend({
                                        cur.nodeType === 1 &&
                                                jQuery.find.matchesSelector(cur, selectors)) ) {
 
-                                       cur = matched.push( cur );
+                                       matched.push( cur );
                                        break;
                                }
                        }