From 5cf50d8602c64aa0d40134be2eb7198fa93bf673 Mon Sep 17 00:00:00 2001 From: Ilya Laktyushin Date: Thu, 18 Jul 2024 00:29:57 +0400 Subject: [PATCH] Fix browser error --- submodules/BrowserUI/Sources/BrowserWebContent.swift | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/submodules/BrowserUI/Sources/BrowserWebContent.swift b/submodules/BrowserUI/Sources/BrowserWebContent.swift index e49c7fb54a..2994d76f27 100644 --- a/submodules/BrowserUI/Sources/BrowserWebContent.swift +++ b/submodules/BrowserUI/Sources/BrowserWebContent.swift @@ -477,14 +477,22 @@ final class BrowserWebContent: UIView, BrowserContent, WKNavigationDelegate, WKU } func webView(_ webView: WKWebView, didFailProvisionalNavigation navigation: WKNavigation!, withError error: Error) { - self.currentError = error + if (error as NSError).code != -999 { + self.currentError = error + } else { + self.currentError = nil + } if let (size, insets) = self.validLayout { self.updateLayout(size: size, insets: insets, transition: .immediate) } } func webView(_ webView: WKWebView, didFail navigation: WKNavigation!, withError error: Error) { - self.currentError = error + if (error as NSError).code != -999 { + self.currentError = error + } else { + self.currentError = nil + } if let (size, insets) = self.validLayout { self.updateLayout(size: size, insets: insets, transition: .immediate) }