diff --git a/README.md b/README.md index e027de3..8b077f1 100644 --- a/README.md +++ b/README.md @@ -205,7 +205,7 @@ import PackageDescription let package = Package( name: "SomeProject", dependencies: [ - .package(url: "https://github.com/dankinsoid/VDFlow.git", from: "4.10.0") + .package(url: "https://github.com/dankinsoid/VDFlow.git", from: "4.11.0") ], targets: [ .target(name: "SomeProject", dependencies: ["VDFlow"]) diff --git a/Sources/VDFlow/NavigationSteps.swift b/Sources/VDFlow/NavigationSteps.swift index a14b608..7282d2e 100644 --- a/Sources/VDFlow/NavigationSteps.swift +++ b/Sources/VDFlow/NavigationSteps.swift @@ -86,9 +86,9 @@ private struct NavigationStackWrapper: View { var body: some View { NavigationStack( path: Binding { - guard let selectedIndex else { return NavigationPath() } + guard let selectedIndex, selectedIndex > 0 else { return NavigationPath() } return NavigationPath( - (0...selectedIndex).compactMap { + (1...selectedIndex).compactMap { tag(of: children[$0], $0) } )