diff --git a/submodules/Display/Source/Navigation/NavigationController.swift b/submodules/Display/Source/Navigation/NavigationController.swift index 4b156aa6a5..7386e862b4 100644 --- a/submodules/Display/Source/Navigation/NavigationController.swift +++ b/submodules/Display/Source/Navigation/NavigationController.swift @@ -99,8 +99,11 @@ private final class NavigationControllerNode: ASDisplayNode { } override func accessibilityPerformEscape() -> Bool { - let _ = self.controller?.popViewController(animated: true) - return true + if let controller = self.controller, controller.viewControllers.count > 1 { + let _ = self.controller?.popViewController(animated: true) + return true + } + return false } }