Skip to content

Commit

Permalink
Fix globe icon not disappearing
Browse files Browse the repository at this point in the history
  • Loading branch information
alessandroboron committed Jan 23, 2025
1 parent b20b0a3 commit 5323ec5
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down Expand Up @@ -102,6 +97,7 @@ extension SpecialErrorPageNavigationHandler: WebViewNavigationHandling {
return true
case .navigationNotHandled:
isSpecialErrorPageRequest = false
isSpecialErrorPageVisible = false
return false
}
}
Expand Down

0 comments on commit 5323ec5

Please sign in to comment.