mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-12-18 13:16:49 +00:00
Skip blank, host-less URLs so that app launchers can launch the app using just the scheme (e.g. icecubesapp://) without invoking a safari error page (#502)
Co-authored-by: Greg <greg@cromulentlabs.com>
This commit is contained in:
parent
59ef1b2909
commit
8a40799a3d
1 changed files with 1 additions and 1 deletions
|
@ -25,7 +25,7 @@ private struct SafariRouter: ViewModifier {
|
|||
.onOpenURL(perform: { url in
|
||||
// Open external URL (from icecubesapp://)
|
||||
let urlString = url.absoluteString.replacingOccurrences(of: "icecubesapp://", with: "https://")
|
||||
guard let url = URL(string: urlString) else { return }
|
||||
guard let url = URL(string: urlString), url.host != nil else { return }
|
||||
_ = routerPath.handle(url: url)
|
||||
})
|
||||
.onAppear {
|
||||
|
|
Loading…
Reference in a new issue