Skip to content

Commit 576b10a

Browse files
authored
Merge pull request #31 from dteoh/fix-broken-nsopenpanel
Fix import preferences not working when file open dialog is cancelled.
2 parents 07b4144 + b5bfff5 commit 576b10a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

devdocs-macos/DocumentationWindowController.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ extension DocumentationWindowController: DocumentationViewDelegate {
9494
panel.beginSheetModal(for: self.window!) { modalResponse in
9595
if modalResponse == NSApplication.ModalResponse.OK, let url = panel.url {
9696
completionHandler([url])
97+
} else {
98+
completionHandler(nil)
9799
}
98100
}
99101
}

0 commit comments

Comments
 (0)