Browse Source

Merge branch 'develop_PDFReaderProNew' of git.kdan.cc:Mac_PDF/PDF_Office into develop_PDFReaderProNew

tangchao 11 months ago
parent
commit
15b87ded5e
1 changed files with 3 additions and 0 deletions
  1. 3 0
      PDF Office/PDF Master/AppDelegate.swift

+ 3 - 0
PDF Office/PDF Master/AppDelegate.swift

@@ -780,6 +780,9 @@ extension AppDelegate : NSMenuDelegate,NSMenuItemValidation {
         }
         if action == #selector(closeDocument) {
             guard let _windowC = NSApp.mainWindow?.windowController as? KMBrowserWindowController else {
+                if NSApp.mainWindow?.windowController != nil {
+                    return true
+                }
                 return false
             }
             let isNewTab = _windowC.browser?.activeTabContents()?.isNewTab ?? false