Skip to content

Commit

Permalink
Update packages/desktop-client/src/components/ScrollProvider.tsx
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
joel-jeremy and coderabbitai[bot] authored Oct 24, 2024
1 parent 6a6a291 commit b0ae454
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/desktop-client/src/components/ScrollProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export function ScrollProvider<T extends Element>({

const hasScrolledToBottom = useCallback(
(tolerance = 1) => {
if (scrollHeight && scrollY && clientHeight) {
if (scrollHeight != null && scrollY != null && clientHeight != null) {
return scrollHeight - scrollY <= clientHeight + tolerance;
}
return false;
Expand Down

0 comments on commit b0ae454

Please sign in to comment.