Skip to content

Commit 0c08976

Browse files
committed
change methodology to use Math.floor
1 parent 5f979c1 commit 0c08976

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/commons/withScrollEnabler.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function withScrollEnabler<PROPS, STATICS = {}>(WrappedComponent: React.Componen
2525
const layoutSize = useRef(0);
2626

2727
const checkScroll = useCallback(() => {
28-
const isScrollEnabled = (contentSize.current - 1) > layoutSize.current;
28+
const isScrollEnabled = Math.floor(contentSize.current) > layoutSize.current;
2929
if (isScrollEnabled !== scrollEnabled) {
3030
setScrollEnabled(isScrollEnabled);
3131
}

0 commit comments

Comments
 (0)