Skip to content

Commit

Permalink
[Fix] Always call decisionHandler on webview navigationAction
Browse files Browse the repository at this point in the history
  • Loading branch information
filip-zielinski committed Jan 15, 2024
1 parent ff468d1 commit b2cc8e3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Sources/RichText/Views/Webview.swift
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,10 @@ extension WebView {
}

if url.scheme == nil {
guard let httpsURL = URL(string: "https://\(url.absoluteString)") else { return }
guard let httpsURL = URL(string: "https://\(url.absoluteString)") else {
decisionHandler(WKNavigationActionPolicy.cancel)
return
}
url = httpsURL
}

Expand Down

0 comments on commit b2cc8e3

Please sign in to comment.