Backed out commit [6260], was causing too many problems. We'll have to bite the bullet and assume that the incoming result set has array methods. Un-fixes jQuery bug #4250.
This commit is contained in:
parent
2d4755a0fb
commit
26731d475b
2 changed files with 17 additions and 15 deletions
11
src/core.js
11
src/core.js
|
@ -292,9 +292,14 @@ jQuery.fn = jQuery.prototype = {
|
|||
return this.prevObject || jQuery(null);
|
||||
},
|
||||
|
||||
// For internal use only.
|
||||
// Behaves like an Array's method, not like a jQuery method.
|
||||
push: [].push,
|
||||
sort: [].sort,
|
||||
splice: [].splice,
|
||||
|
||||
find: function( selector ) {
|
||||
var ret = this.pushStack( "", "find", selector ), length = 0,
|
||||
splice = Array.prototype.splice;
|
||||
var ret = this.pushStack( "", "find", selector ), length = 0;
|
||||
|
||||
for ( var i = 0, l = this.length; i < l; i++ ) {
|
||||
length = ret.length;
|
||||
|
@ -305,7 +310,7 @@ jQuery.fn = jQuery.prototype = {
|
|||
for ( var n = length; n < ret.length; n++ ) {
|
||||
for ( var r = 0; r < length; r++ ) {
|
||||
if ( ret[r] === ret[n] ) {
|
||||
splice.call(ret, n--, 1);
|
||||
ret.splice(n--, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue