Use a do-while statement to reduce redundant code

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
This commit is contained in:
Rick Waldron 2012-05-07 16:49:23 -04:00
parent b26c34a69f
commit 38fe2deab5

View File

@ -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;
}