macos: new window assertion is unnecessary

We handle both cases
This commit is contained in:
Mitchell Hashimoto
2023-09-10 09:03:53 -07:00
parent 303c5ca189
commit 5f30223e84

View File

@ -32,10 +32,6 @@ class PrimaryWindowManager {
let mainManagedWindow = managedWindows let mainManagedWindow = managedWindows
.first { $0.window.isMainWindow } .first { $0.window.isMainWindow }
// In case we run into the inconsistency, let it crash in debug mode so we
// can fix our window management setup to prevent this from happening.
assert(mainManagedWindow != nil || !managedWindows.isEmpty)
return (mainManagedWindow ?? managedWindows.first) return (mainManagedWindow ?? managedWindows.first)
.map { $0.window } .map { $0.window }
} }