We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 72d4ac7 commit 6e4c032Copy full SHA for 6e4c032
TypeScriptPlugin/Implementation/URL+Additions.swift
@@ -5,14 +5,7 @@ import Foundation
5
extension StringProtocol {
6
var fileURL: URL? {
7
let str: String = (self as? String) ?? String(self)
8
-
9
- let url = if #available(macOS 14, *) {
10
- URL(string: str, encodingInvalidCharacters: false)
11
- } else {
12
- URL(string: str)
13
- }
14
15
- guard let url else { return .none }
+ guard let url = URL(string: str) else { return .none }
16
17
switch url.scheme {
18
case "file": return url
0 commit comments