Skip to content

Commit

Permalink
fix(ios): allow access to extension-less files (#2726)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesdiacono authored Apr 9, 2020
1 parent b532179 commit 3baf81b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ios/Capacitor/Capacitor/CAPAssetHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ class CAPAssetHandler: NSObject, WKURLSchemeHandler {
let url = urlSchemeTask.request.url!
let stringToLoad = url.path

if stringToLoad.isEmpty || url.pathExtension.isEmpty {
startPath.append("/index.html")
} else if stringToLoad.starts(with: CAPBridge.CAP_FILE_START) {
if stringToLoad.starts(with: CAPBridge.CAP_FILE_START) {
startPath = stringToLoad.replacingOccurrences(of: CAPBridge.CAP_FILE_START, with: "")
} else if stringToLoad.isEmpty || url.pathExtension.isEmpty {
startPath.append("/index.html")
} else {
startPath.append(stringToLoad)
}
Expand Down

0 comments on commit 3baf81b

Please sign in to comment.