From ef87b5915c09bc5239b82b524252e61851ee1949 Mon Sep 17 00:00:00 2001 From: yotamts Date: Thu, 25 Dec 2025 16:08:53 +0200 Subject: [PATCH] race-condition removal --- .../react-native-ui-lib/src/commons/withScrollEnabler.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/react-native-ui-lib/src/commons/withScrollEnabler.tsx b/packages/react-native-ui-lib/src/commons/withScrollEnabler.tsx index 251f6adbb9..f9c8ab426f 100644 --- a/packages/react-native-ui-lib/src/commons/withScrollEnabler.tsx +++ b/packages/react-native-ui-lib/src/commons/withScrollEnabler.tsx @@ -26,10 +26,8 @@ function withScrollEnabler(WrappedComponent: React.Componen const checkScroll = useCallback(() => { const isScrollEnabled = Math.floor(contentSize.current) > layoutSize.current; - if (isScrollEnabled !== scrollEnabled) { - setScrollEnabled(isScrollEnabled); - } - }, [scrollEnabled]); + setScrollEnabled(isScrollEnabled); + }, []); const onContentSizeChange = useCallback((contentWidth: number, contentHeight: number) => { const size = props.horizontal ? contentWidth : contentHeight;