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 c0b276d commit ffd1f88Copy full SHA for ffd1f88
Sources/Pageboy/PageboyViewController+Management.swift
@@ -254,7 +254,7 @@ extension PageboyViewController: UIPageViewControllerDataSource {
254
return nil
255
}
256
257
- if let index = currentIndex {
+ if let index = currentIndex, viewControllerCount > 1 {
258
if index != 0 {
259
return fetchViewController(at: index - 1)
260
} else if isInfiniteScrollEnabled {
@@ -270,7 +270,7 @@ extension PageboyViewController: UIPageViewControllerDataSource {
270
271
272
273
274
if index != viewControllerCount - 1 {
275
return fetchViewController(at: index + 1)
276
0 commit comments