Skip to content

Commit ba38472

Browse files
committed
Always do the normal thing, open new window conditionally
1 parent e84154c commit ba38472

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

devdocs-macos/AppDelegate.swift

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,8 @@ class AppDelegate: NSObject, NSApplicationDelegate {
2929
}
3030

3131
func applicationShouldHandleReopen(_ sender: NSApplication, hasVisibleWindows flag: Bool) -> Bool {
32-
if flag {
33-
return false
34-
} else {
35-
DocumentationWindows.shared.newWindow()
36-
return true
37-
}
32+
DocumentationWindows.shared.newWindowIfNoWindow()
33+
return true
3834
}
3935

4036
@IBAction func newTab(_ sender: Any) {

0 commit comments

Comments
 (0)