diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewHelper.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewHelper.kt index 633b26dd1c59f6..51e55bbf7b1714 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewHelper.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewHelper.kt @@ -113,7 +113,7 @@ public object ReactScrollViewHelper { return } val contentView = scrollView.getChildAt(0) ?: return - for (scrollListener in scrollListeners) { + for (scrollListener in scrollListeners.toList()) { scrollListener.onScroll(scrollView, scrollEventType, xVelocity, yVelocity) } val reactContext = scrollView.context as ReactContext @@ -146,7 +146,7 @@ public object ReactScrollViewHelper { /** This is only for Java listeners. onLayout events emitted to JS are handled elsewhere. */ @JvmStatic public fun emitLayoutEvent(scrollView: ViewGroup) { - for (scrollListener in scrollListeners) { + for (scrollListener in scrollListeners.toList()) { scrollListener.onLayout(scrollView) } }