mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-01-12 22:54:03 +01: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
@ -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 New Issue
Block a user