aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarian Sollmann <marian.sollmann@cargomedia.ch>2013-10-28 15:31:58 +0100
committerRichard Gibson <richard.gibson@gmail.com>2013-11-06 10:27:48 -0500
commit3c968ce65d57595656ada486d7d9a8a7144ea2e0 (patch)
tree92d97be28cc25b136eeb7cbe71e59d12d7516d68
parent90d9c4632c1f05f32ead98b46796bed9635e40fb (diff)
downloadjquery-3c968ce65d57595656ada486d7d9a8a7144ea2e0.tar.gz
jquery-3c968ce65d57595656ada486d7d9a8a7144ea2e0.zip
Fix #14190: Remove unnecessary assignment in .closest. Close gh-1411.
(cherry picked from commit 346b031af9e3b315ef351a9cc7fee56f930cf346) Conflicts: src/traversing.js
-rw-r--r--src/traversing.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/traversing.js b/src/traversing.js
index 02ea249fe..5dd970f67 100644
--- a/src/traversing.js
+++ b/src/traversing.js
@@ -61,7 +61,7 @@ jQuery.fn.extend({
var cur,
i = 0,
l = this.length,
- ret = [],
+ matched = [],
pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?
jQuery( selectors, context || this.context ) :
0;
@@ -76,13 +76,13 @@ jQuery.fn.extend({
cur.nodeType === 1 &&
jQuery.find.matchesSelector(cur, selectors)) ) {
- cur = ret.push( cur );
+ matched.push( cur );
break;
}
}
}
- return this.pushStack( ret.length > 1 ? jQuery.unique( ret ) : ret );
+ return this.pushStack( matched.length > 1 ? jQuery.unique( matched ) : matched );
},
// Determine the position of an element within