mirror of
https://github.com/jquery/jquery.git
synced 2026-02-17 20:12:47 -05:00
Use a do-while statement to reduce redundant code
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
This commit is contained in:
@@ -175,11 +175,10 @@ function isDisconnected( node ) {
|
||||
}
|
||||
|
||||
function sibling( cur, dir ) {
|
||||
cur = cur[ dir ];
|
||||
|
||||
while ( cur.nodeType !== 1 ) {
|
||||
do {
|
||||
cur = cur[ dir ];
|
||||
}
|
||||
} while ( cur.nodeType !== 1 );
|
||||
|
||||
return cur;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user