Skip to content

Commit

Permalink
fix: no-op if onScroll applied to incorrect element
Browse files Browse the repository at this point in the history
  • Loading branch information
SpencerWhitehead7 committed Oct 29, 2024
1 parent 2911fcd commit bc00ee3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/virtual/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export function createVirtualList<T extends readonly any[]>({
}),
e => {
// @ts-expect-error
setOffset(e.target?.scrollTop);
if (e.target?.scrollTop !== undefined) setOffset(e.target.scrollTop);
},
];
}
Expand Down

0 comments on commit bc00ee3

Please sign in to comment.