update_floating_recipient_bar: Don't loop infinitely if no message selected.

(imported from commit a75cfd41ed8a8ce5256d1caa29f6c5bc0689e7d2)
This commit is contained in:
Waseem Daher 2012-10-26 15:02:04 -04:00
parent fdba3addc8
commit b0406ee1d2
1 changed files with 3 additions and 0 deletions

View File

@ -170,6 +170,9 @@ function update_floating_recipient_bar() {
// row is at least partially occluded by our box.
// Start with the pointer's current location.
var candidate = selected_message;
if (candidate === undefined) {
return;
}
while (true) {
candidate = candidate.prev();
if (candidate.length === 0) {