mirror of
https://github.com/jquery/jquery.git
synced 2026-01-25 22:18:26 -05:00
Fixed a bug in .dir() where it would return non-element nodes.
This commit is contained in:
@@ -404,7 +404,8 @@ jQuery.extend({
|
||||
var matched = [];
|
||||
var cur = elem[dir];
|
||||
while ( cur && cur != document ) {
|
||||
matched.push( cur );
|
||||
if ( cur.nodeType == 1 )
|
||||
matched.push( cur );
|
||||
cur = cur[dir];
|
||||
}
|
||||
return matched;
|
||||
|
||||
Reference in New Issue
Block a user