diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollViewManager.java b/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollViewManager.java index 6d4bd242dd2609..2cdfec69aa1ee8 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollViewManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollViewManager.java @@ -109,7 +109,7 @@ public void setSnapToAlignment(ReactHorizontalScrollView view, String alignment) @ReactProp(name = "snapToOffsets") public void setSnapToOffsets( ReactHorizontalScrollView view, @Nullable ReadableArray snapToOffsets) { - if (snapToOffsets == null) { + if (snapToOffsets == null || snapToOffsets.size() == 0) { view.setSnapOffsets(null); return; } diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewManager.java b/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewManager.java index 8a3623444be309..d1b32c61d3c96c 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewManager.java @@ -102,7 +102,7 @@ public void setSnapToInterval(ReactScrollView view, float snapToInterval) { @ReactProp(name = "snapToOffsets") public void setSnapToOffsets(ReactScrollView view, @Nullable ReadableArray snapToOffsets) { - if (snapToOffsets == null) { + if (snapToOffsets == null || snapToOffsets.size() == 0) { view.setSnapOffsets(null); return; }