mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
Don't error out scrolling when there's nothing there
(imported from commit e2af794dafb93e3509c6fa5f28314ac8e21849b0)
This commit is contained in:
committed by
Jessica McKellar
parent
13045f953f
commit
ffdfa203e8
@@ -6,7 +6,7 @@ var exports = {};
|
||||
// that our next element is *not* a message_row, so this
|
||||
// isn't going to end up empty unless we're at the bottom or top.
|
||||
exports.next_visible = function (message_row) {
|
||||
if (message_row === undefined) {
|
||||
if (message_row === undefined || message_row.length === 0) {
|
||||
return $();
|
||||
}
|
||||
var row = message_row.next('.selectable_row');
|
||||
@@ -22,7 +22,7 @@ exports.next_visible = function (message_row) {
|
||||
};
|
||||
|
||||
exports.prev_visible = function (message_row) {
|
||||
if (message_row === undefined) {
|
||||
if (message_row === undefined || message_row.length === 0) {
|
||||
return $();
|
||||
}
|
||||
var row = message_row.prev('.selectable_row');
|
||||
|
||||
Reference in New Issue
Block a user