From 5323ec5d94fb8b23511d4a4d54c6597a9e3fc24d Mon Sep 17 00:00:00 2001 From: Alessandro Boron Date: Thu, 23 Jan 2025 21:53:58 +1100 Subject: [PATCH] Fix globe icon not disappearing --- .../SpecialErrorPageNavigationHandler.swift | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/DuckDuckGo/SpecialErrorPage/SpecialErrorPageNavigationHandler.swift b/DuckDuckGo/SpecialErrorPage/SpecialErrorPageNavigationHandler.swift index ae205922068..00a68033e11 100644 --- a/DuckDuckGo/SpecialErrorPage/SpecialErrorPageNavigationHandler.swift +++ b/DuckDuckGo/SpecialErrorPage/SpecialErrorPageNavigationHandler.swift @@ -66,12 +66,7 @@ extension SpecialErrorPageNavigationHandler: WebViewNavigationHandling { @MainActor func handleDecidePolicy(for navigationAction: WKNavigationAction, webView: WKWebView) { - // A new main navigation is starting reset the error - if navigationAction.isTargetingMainFrame() { - errorData = nil - failedURL = nil - isSpecialErrorPageVisible = false - } + guard navigationAction.isTargetingMainFrame() else { return } maliciousSiteProtectionNavigationHandler.makeMaliciousSiteDetectionTask(for: navigationAction, webView: webView) } @@ -102,6 +97,7 @@ extension SpecialErrorPageNavigationHandler: WebViewNavigationHandling { return true case .navigationNotHandled: isSpecialErrorPageRequest = false + isSpecialErrorPageVisible = false return false } }