Skip to content

Commit

Permalink
Merge pull request #43 from filip-zielinski/fix/navigation-action-han…
Browse files Browse the repository at this point in the history
…dler

[Fix] Always call decisionHandler on webview navigationAction
  • Loading branch information
NuPlay authored Jan 21, 2024
2 parents 560b3a6 + b2cc8e3 commit 63cb8b2
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 63cb8b2

Please sign in to comment.