Skip to content

Commit 3baf81b

Browse files
authored
fix(ios): allow access to extension-less files (#2726)
1 parent b532179 commit 3baf81b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ios/Capacitor/Capacitor/CAPAssetHandler.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ class CAPAssetHandler: NSObject, WKURLSchemeHandler {
1414
let url = urlSchemeTask.request.url!
1515
let stringToLoad = url.path
1616

17-
if stringToLoad.isEmpty || url.pathExtension.isEmpty {
18-
startPath.append("/index.html")
19-
} else if stringToLoad.starts(with: CAPBridge.CAP_FILE_START) {
17+
if stringToLoad.starts(with: CAPBridge.CAP_FILE_START) {
2018
startPath = stringToLoad.replacingOccurrences(of: CAPBridge.CAP_FILE_START, with: "")
19+
} else if stringToLoad.isEmpty || url.pathExtension.isEmpty {
20+
startPath.append("/index.html")
2121
} else {
2222
startPath.append(stringToLoad)
2323
}

0 commit comments

Comments
 (0)