We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d0b77b3 commit 83979f9Copy full SHA for 83979f9
android/src/main/java/com/reactnativepagerview/ViewPagerAdapter.kt
@@ -63,7 +63,9 @@ class ViewPagerAdapter() : Adapter<ViewPagerViewHolder>() {
63
}
64
65
fun removeChildAt(index: Int) {
66
- childrenViews.removeAt(index)
67
- notifyItemRemoved(index)
+ if (index >= 0 && index < childrenViews.size) {
+ childrenViews.removeAt(index)
68
+ notifyItemRemoved(index)
69
+ }
70
71
0 commit comments