floating_recipient_bar: Fix incorrect use of jQuery .next().

The semantic of jQuery's .next(selector) return nothing if the
selector doesn't match the next child.
This commit is contained in:
Tim Abbott 2019-02-11 16:45:37 -08:00
parent 5bd2c70c3c
commit 40916803e7
1 changed files with 5 additions and 1 deletions

View File

@ -141,7 +141,11 @@ exports.relevant_recipient_bars = function () {
header_height += 10;
function next(elem) {
return elem.next('.recipient_row');
elem = elem.next();
while (elem.length !== 0 && !elem.hasClass("recipient_row")) {
elem = elem.next();
}
return elem;
}
// Now start the forward traversal of recipient bars.