Skip to content

Commit a4197fe

Browse files
committed
Attempt reloading without authentication when provisioning fails
1 parent bb3c1ba commit a4197fe

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

WooCommerce/Classes/Authentication/AuthenticatedWebViewController.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,10 @@ extension AuthenticatedWebViewController: WKNavigationDelegate {
321321
func webView(_ webView: WKWebView, didFailProvisionalNavigation navigation: WKNavigation!, withError error: Error) {
322322
viewModel.didFailProvisionalNavigation(with: error)
323323
activityIndicator.stopAnimating()
324+
// attempt reloading without authentication when provisioning fails
325+
if let url = viewModel.initialURL {
326+
webView.load(URLRequest(url: url))
327+
}
324328
}
325329
}
326330

0 commit comments

Comments
 (0)