Merge pull request #6909 from matrix-org/t3chguy/fix/19255

This commit is contained in:
Michael Telatynski 2021-10-06 13:25:03 +01:00 committed by GitHub
commit a51847e50a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;