We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 868f262 commit d75c899Copy full SHA for d75c899
src/core.js
@@ -269,19 +269,15 @@ jQuery.fn = jQuery.prototype = {
269
push: [].push,
270
271
find: function( selector ) {
272
- if ( this.length === 1 && !/,/.test(selector) ) {
+ if ( this.length === 1 ) {
273
var ret = this.pushStack( [], "find", selector );
274
ret.length = 0;
275
jQuery.find( selector, this[0], ret );
276
return ret;
277
} else {
278
- var elems = jQuery.map(this, function(elem){
+ return this.pushStack( jQuery.unique(jQuery.map(this, function(elem){
279
return jQuery.find( selector, elem );
280
- });
281
-
282
- return this.pushStack( /[^+>] [^+>]/.test( selector ) ?
283
- jQuery.unique( elems ) :
284
- elems, "find", selector );
+ })), "find", selector );
285
}
286
},
287
0 commit comments