There was an error while loading. Please reload this page.
1 parent d8d3107 commit 6f9c413Copy full SHA for 6f9c413
1 file changed
Sources/SwiftUIPager/Page.swift
@@ -37,7 +37,7 @@ public class Page: ObservableObject {
37
var totalPages: Int = Int.max {
38
didSet {
39
// reset in case there's a deletion
40
- self.index = index
+ self.index = totalPages > 0 ? index : 0
41
}
42
43
0 commit comments