Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Fix spaces keyboard shortcuts not working for last space #6909

Merged
merged 1 commit into from
Oct 6, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/stores/SpaceStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@ export class SpaceStoreClass extends AsyncStoreWithClient<IState> {
// 1 is Home, 2-9 are the spaces after Home
if (payload.num === 1) {
this.setActiveSpace(null);
} else if (this.spacePanelSpaces.length >= payload.num) {
} else if (payload.num > 0 && this.spacePanelSpaces.length > payload.num - 2) {
this.setActiveSpace(this.spacePanelSpaces[payload.num - 2]);
}
break;
Expand Down