Skip to content

Commit c35a5ee

Browse files
authored
fix:(ios) removing the last page (#466)
1 parent 4d84154 commit c35a5ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ios/ReactNativePageView.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ - (void)goTo:(NSInteger)index animated:(BOOL)animated {
256256

257257
if (!isForward && diff > 0) {
258258
for (NSInteger i=_currentIndex; i>=index; i--) {
259-
if (index == _currentIndex) {
259+
if (index == _currentIndex || i == numberOfPages) {
260260
continue;
261261
}
262262
[self goToViewController:i direction:direction animated:animated shouldCallOnPageSelected: i == index];

0 commit comments

Comments
 (0)