Fix spaces keyboard shortcuts not working for last space

pull/21833/head
Michael Telatynski 2021-10-06 10:56:11 +01:00
parent 1d5a1c7a82
commit d8bc868e79
1 changed files with 1 additions and 1 deletions

View File

@ -793,7 +793,7 @@ export class SpaceStoreClass extends AsyncStoreWithClient<IState> {
// 1 is Home, 2-9 are the spaces after Home // 1 is Home, 2-9 are the spaces after Home
if (payload.num === 1) { if (payload.num === 1) {
this.setActiveSpace(null); 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]); this.setActiveSpace(this.spacePanelSpaces[payload.num - 2]);
} }
break; break;