format swift

This commit is contained in:
Kyle Spearrin 2019-09-09 10:13:36 -04:00
parent 5b72888ae8
commit b841805c1b
1 changed files with 2 additions and 2 deletions

View File

@ -184,7 +184,7 @@ class SafariExtensionViewController: SFSafariExtensionViewController, WKScriptMe
let fileManager = FileManager.default
if !fileManager.fileExists(atPath: url.absoluteString) {
fileManager.createFile(atPath: url.absoluteString, contents: Data(),
attributes: nil)
attributes: nil)
}
try data!.write(to: url)
} catch {
@ -217,7 +217,7 @@ class SafariExtensionViewController: SFSafariExtensionViewController, WKScriptMe
extension SafariExtensionViewController: WKUIDelegate {
func webView(_: WKWebView, runOpenPanelWith _: WKOpenPanelParameters, initiatedByFrame _: WKFrameInfo,
completionHandler: @escaping ([URL]?) -> Void) {
completionHandler: @escaping ([URL]?) -> Void) {
let openPanel = NSOpenPanel()
openPanel.canChooseFiles = true
openPanel.begin { result in