Skip to content

Commit

Permalink
Fix #5798 for handling no network (#6173)
Browse files Browse the repository at this point in the history
* webview.url was nil which prevents what’s new page from also having the error page
  • Loading branch information
LamourBt authored Apr 20, 2020
1 parent 0f1624f commit d975952
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion Client/Frontend/Browser/BrowserViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -999,7 +999,6 @@ class BrowserViewController: UIViewController {
} else {
request = nil
}

switchToPrivacyMode(isPrivate: isPrivate)
tabManager.selectTab(tabManager.addTab(request, isPrivate: isPrivate))
}
Expand Down
1 change: 0 additions & 1 deletion Client/Frontend/Browser/TabTrayController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,6 @@ class TabTrayController: UIViewController {
}
// We dismiss the tab tray once we are done. So no need to re-enable the toolbar
toolbar.isUserInteractionEnabled = false

tabManager.selectTab(tabManager.addTab(request, isPrivate: tabDisplayManager.isPrivate))
}
}
Expand Down
4 changes: 3 additions & 1 deletion Client/Frontend/InternalSchemeHandler/ErrorPageHelper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,9 @@ class ErrorPageHelper {
}

func loadPage(_ error: NSError, forUrl url: URL, inWebView webView: WKWebView) {
guard var components = URLComponents(string: "\(InternalURL.baseUrl)/\(ErrorPageHandler.path)"), let webViewUrl = webView.url else {
let destinationUrl: URL? = (webView.url != nil) ? webView.url : url

guard var components = URLComponents(string: "\(InternalURL.baseUrl)/\(ErrorPageHandler.path)"), let webViewUrl = destinationUrl else {
return
}

Expand Down

0 comments on commit d975952

Please sign in to comment.