From 4254f15b44a850faea2d5e929252b43f3a99aef4 Mon Sep 17 00:00:00 2001 From: Ryan Tharp Date: Wed, 26 Feb 2020 16:53:35 -0800 Subject: [PATCH 1/3] fix message still loading issue --- js/views/conversation_view.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/js/views/conversation_view.js b/js/views/conversation_view.js index 0550fa63e..34b25459f 100644 --- a/js/views/conversation_view.js +++ b/js/views/conversation_view.js @@ -1189,6 +1189,11 @@ const el = this.$(`#${message.id}`); const position = el.position(); + // This message is likely not loaded yet in the DOM + if (!position) { + // should this be break? + continue; + } const { top } = position; // We're fully below the viewport, continue searching up. From 56d5bb5b338d235afaee7e71f20b7efb22803a98 Mon Sep 17 00:00:00 2001 From: Ryan Tharp Date: Mon, 2 Mar 2020 16:11:58 -0800 Subject: [PATCH 2/3] fix lint --- js/views/conversation_view.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/views/conversation_view.js b/js/views/conversation_view.js index 34b25459f..14e59bd44 100644 --- a/js/views/conversation_view.js +++ b/js/views/conversation_view.js @@ -1192,6 +1192,8 @@ // This message is likely not loaded yet in the DOM if (!position) { // should this be break? + + // eslint-disable-next-line no-continue continue; } const { top } = position; From 81d43ba5abd8fa08efc33d992f0bd0c97faae942 Mon Sep 17 00:00:00 2001 From: Ryan Tharp Date: Mon, 2 Mar 2020 16:30:30 -0800 Subject: [PATCH 3/3] lint --- js/views/conversation_view.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/views/conversation_view.js b/js/views/conversation_view.js index 14e59bd44..bebee05cf 100644 --- a/js/views/conversation_view.js +++ b/js/views/conversation_view.js @@ -1192,7 +1192,7 @@ // This message is likely not loaded yet in the DOM if (!position) { // should this be break? - + // eslint-disable-next-line no-continue continue; }