From 4af3994b574b01dbc5983e8a1607cf5aa79a753c Mon Sep 17 00:00:00 2001 From: Spencer Whitehead Date: Tue, 29 Oct 2024 09:39:05 -0400 Subject: [PATCH] fix: no-op if onScroll applied to incorrect element --- packages/virtual/src/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/virtual/src/index.tsx b/packages/virtual/src/index.tsx index 27735db89..0be48405b 100644 --- a/packages/virtual/src/index.tsx +++ b/packages/virtual/src/index.tsx @@ -58,7 +58,7 @@ export function createVirtualList({ }), e => { // @ts-expect-error - setOffset(e.target?.scrollTop); + if (e.target?.scrollTop) setOffset(e.target.scrollTop); }, ]; }