Skip to content

Commit adb961d

Browse files
authored
Merge pull request #15 from canopas/add-stack-property
Allow accessing stack from UIPilot
2 parents 448cd64 + 6708e9e commit adb961d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Sources/UIPilot/UIPilot.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ public class UIPilot<T: Equatable>: ObservableObject {
1414
let logger: Logger
1515
var state: UIPilotViewState<T>!
1616

17+
public var stack: [T] {
18+
return paths.map { $0.route }
19+
}
20+
1721
public init(initial: T, debug: Bool = false) {
1822
logger = debug ? DebugLog() : EmptyLog()
1923
logger.log("UIPilot - Pilot Initialized.")

0 commit comments

Comments
 (0)