Skip to content

Commit 931b193

Browse files
fix(ios): restore animated param check (#569)
1 parent 84e3703 commit 931b193

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ios/ReactNativePageView.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ - (void)goTo:(NSInteger)index animated:(BOOL)animated {
275275
if (i == _currentIndex) {
276276
continue;
277277
}
278-
[self goToViewController:i direction:direction animated:(!self.animating && i == index) shouldCallOnPageSelected: i == index];
278+
[self goToViewController:i direction:direction animated:(!self.animating && i == index && animated) shouldCallOnPageSelected: i == index];
279279
}
280280
}
281281

@@ -285,7 +285,7 @@ - (void)goTo:(NSInteger)index animated:(BOOL)animated {
285285
if (i == _currentIndex || i >= numberOfPages) {
286286
continue;
287287
}
288-
[self goToViewController:i direction:direction animated:(!self.animating && i == index) shouldCallOnPageSelected: i == index];
288+
[self goToViewController:i direction:direction animated:(!self.animating && i == index && animated) shouldCallOnPageSelected: i == index];
289289
}
290290
}
291291

0 commit comments

Comments
 (0)