diff --git a/Sources/UIKitNavigation/Navigation/NavigationStackController.swift b/Sources/UIKitNavigation/Navigation/NavigationStackController.swift index 367ca3bab..090d3c5be 100644 --- a/Sources/UIKitNavigation/Navigation/NavigationStackController.swift +++ b/Sources/UIKitNavigation/Navigation/NavigationStackController.swift @@ -411,6 +411,7 @@ } public func navigationBar(_ navigationBar: UINavigationBar, didPop item: UINavigationItem) { + guard !elementsBeingPopped.isEmpty else { return } path.removeAll(where: { elementsBeingPopped.contains($0) }) elementsBeingPopped.removeAll() }