From b9314889d7299e84a97dec6d09766e6a59e9f8ee Mon Sep 17 00:00:00 2001 From: rahulramesha <71900764+rahulramesha@users.noreply.github.com> Date: Tue, 16 Apr 2024 15:50:06 +0530 Subject: [PATCH] fix empty blocks due to virtualization in rare cases (#4207) --- web/components/core/render-if-visible-HOC.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/components/core/render-if-visible-HOC.tsx b/web/components/core/render-if-visible-HOC.tsx index b6d587559..dcb9b5cf0 100644 --- a/web/components/core/render-if-visible-HOC.tsx +++ b/web/components/core/render-if-visible-HOC.tsx @@ -48,7 +48,7 @@ const RenderIfVisible: React.FC = (props) => { // } else { // setShouldVisible(entries[0].isIntersecting); // } - setShouldVisible(entries[0].isIntersecting); + setShouldVisible(entries[entries.length - 1].isIntersecting); }, { root: root?.current,