diff --git a/src/logic/Spaces.swift b/src/logic/Spaces.swift index 0dcb3c34..e64fbf6d 100644 --- a/src/logic/Spaces.swift +++ b/src/logic/Spaces.swift @@ -35,7 +35,7 @@ class Spaces { refreshCurrentSpaceId() currentSpaceIndex = idsAndIndexes.first { (spaceId: CGSSpaceID, _) -> Bool in spaceId == currentSpaceId - }!.1 + }?.1 ?? SpaceIndex(1) debugPrint("Current space", currentSpaceId) }