mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
Fix #11370: .siblings() shouldn't throw exception on a detached element
This commit is contained in:
committed by
Dave Methvin
parent
7226cf2800
commit
a619cb3063
@@ -204,7 +204,7 @@ jQuery.each({
|
||||
return jQuery.dir( elem, "previousSibling", until );
|
||||
},
|
||||
siblings: function( elem ) {
|
||||
return jQuery.sibling( elem.parentNode.firstChild, elem );
|
||||
return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );
|
||||
},
|
||||
children: function( elem ) {
|
||||
return jQuery.sibling( elem.firstChild );
|
||||
|
||||
Reference in New Issue
Block a user