Commit 38fe2dea authored by Rick Waldron's avatar Rick Waldron

Use a do-while statement to reduce redundant code

Signed-off-by: 's avatarRick Waldron <waldron.rick@gmail.com>
parent b26c34a6
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment