From d53882224e3f88ac489d26231719cdb320213b5c Mon Sep 17 00:00:00 2001 From: dankinsoid <30962149+dankinsoid@users.noreply.github.com> Date: Fri, 15 Mar 2024 16:23:24 +0300 Subject: [PATCH] 4.12.0 --- README.md | 2 +- Sources/VDFlow/NavigationSteps.swift | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8b077f1..b977c15 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.11.0") + .package(url: "https://github.com/dankinsoid/VDFlow.git", from: "4.12.0") ], targets: [ .target(name: "SomeProject", dependencies: ["VDFlow"]) diff --git a/Sources/VDFlow/NavigationSteps.swift b/Sources/VDFlow/NavigationSteps.swift index 7282d2e..7410211 100644 --- a/Sources/VDFlow/NavigationSteps.swift +++ b/Sources/VDFlow/NavigationSteps.swift @@ -93,8 +93,8 @@ private struct NavigationStackWrapper: View { } ) } set: { path in - guard path.count < children.count + 1 else { return } - let i = path.count - 1 + guard path.count < children.count else { return } + let i = path.count if let tag = tag(of: children[i], i) { selection = tag } else if path.isEmpty {