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() {
|
private class func isSingleSpace() {
|
||||||
let firstSpaceIndex = list[0].spaceIndex
|
if list.count > 0 {
|
||||||
for window in list {
|
let firstSpaceIndex = list[0].spaceIndex
|
||||||
if window.spaceIndex != nil && window.spaceIndex != firstSpaceIndex {
|
for window in list {
|
||||||
Spaces.singleSpace = false
|
if window.spaceIndex != nil && window.spaceIndex != firstSpaceIndex {
|
||||||
return
|
Spaces.singleSpace = false
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Spaces.singleSpace = true
|
Spaces.singleSpace = true
|
||||||
|
|||||||
Reference in new issue
Block a user