Skip to content

Commit 2e41c97

Browse files
committed
SortableList - newHeight in tests (#2571)
1 parent f780e8f commit 2e41c97

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/components/sortableList/index.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@ const SortableList = <ItemT extends SortableListItemProps>(props: SortableListPr
4747
const onItemLayout = useCallback((event: LayoutChangeEvent) => {
4848
// Round height for Android
4949
const newHeight = Math.round(event.nativeEvent.layout.height);
50-
itemHeight.value = newHeight;
50+
// Check validity for tests
51+
if (newHeight) {
52+
itemHeight.value = newHeight;
53+
}
5154
}, []);
5255

5356
const context = useMemo(() => {

0 commit comments

Comments
 (0)