diff --git a/VimR/Workspace/Workspace.swift b/VimR/Workspace/Workspace.swift index e1354d9f..8d7375f6 100644 --- a/VimR/Workspace/Workspace.swift +++ b/VimR/Workspace/Workspace.swift @@ -185,15 +185,15 @@ extension Workspace { self.proxyBar.removeFromSuperview() } - fileprivate func isFile(sender: NSDraggingInfo?) -> Bool! { - return (sender?.draggingPasteboard().types?.contains(String(kUTTypeFileURL)))! + fileprivate func isFile(sender: NSDraggingInfo?) -> Bool { + return (sender?.draggingPasteboard().types?.contains(String(kUTTypeFileURL))) ?? false } override func performDragOperation(_ sender: NSDraggingInfo) -> Bool { if isFile(sender: sender) { let paths = sender .draggingPasteboard() - .propertyList(forType: "NSFilenamesPboardType") as? [String] + .propertyList(forType: NSFilenamesPboardType) as? [String] self.open(filePaths: paths!) return true; }