Skip to content

Commit e1fafda

Browse files
Merge commit '436e621df8faab1ff5079e72fae79421a9f39687'
2 parents 5777d76 + 436e621 commit e1fafda

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Sources/FlowStacks/RoutableCollection+utilities.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ public extension RoutableCollection where Element: RouteProtocol {
8484
/// Goes back to the root screen (index 0). The resulting screen count
8585
/// will be 1.
8686
mutating func goBackToRoot() {
87+
guard self.count > 1 else { return }
8788
goBackTo(index: 0)
8889
}
8990

0 commit comments

Comments
 (0)