fix: app crashes when no windows are open
This commit is contained in:
1 parent
4317bedd9f
commit
cecc53a0e0
1 file changed
+7
-5
@@ -25,11 +25,13 @@ class TrackedWindows {
|
||||
}
|
||||
|
||||
private class func isSingleSpace() {
|
||||
let firstSpaceIndex = list[0].spaceIndex
|
||||
for window in list {
|
||||
if window.spaceIndex != nil && window.spaceIndex != firstSpaceIndex {
|
||||
Spaces.singleSpace = false
|
||||
return
|
||||
if list.count > 0 {
|
||||
let firstSpaceIndex = list[0].spaceIndex
|
||||
for window in list {
|
||||
if window.spaceIndex != nil && window.spaceIndex != firstSpaceIndex {
|
||||
Spaces.singleSpace = false
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
Spaces.singleSpace = true
|
||||
|
||||
Reference in new issue
Block a user