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 36eaab9 commit d617614Copy full SHA for d617614
ios/ReactNativePageView.m
@@ -206,7 +206,10 @@ - (void)updateDataSource {
206
207
if (newIndex == NSNotFound) {
208
// Current view was removed
209
- [self goTo:self.currentIndex animated:NO];
+ NSInteger maxPage = self.reactSubviews.count - 1;
210
+ NSInteger fallbackIndex = self.currentIndex >= maxPage ? maxPage : self.currentIndex;
211
+
212
+ [self goTo:fallbackIndex animated:NO];
213
} else {
214
[self goTo:newIndex animated:NO];
215
}
0 commit comments