diff --git a/src/stores/AsyncStoreWithClient.ts b/src/stores/AsyncStoreWithClient.ts index 5b9f95f991..69aa5367c6 100644 --- a/src/stores/AsyncStoreWithClient.ts +++ b/src/stores/AsyncStoreWithClient.ts @@ -35,11 +35,6 @@ export abstract class AsyncStoreWithClient extends AsyncStore< await this.onAction(payload); if (payload.action === 'MatrixActions.sync') { - // Filter out anything that isn't the first PREPARED sync. - if (!(payload.prevState === 'PREPARED' && payload.state !== 'PREPARED')) { - return; - } - this.matrixClient = payload.matrixClient; await this.onReady(); } else if (payload.action === 'on_client_not_viable' || payload.action === 'on_logged_out') { diff --git a/src/stores/BreadcrumbsStore.ts b/src/stores/BreadcrumbsStore.ts index 34affbe746..ea29cb9dfc 100644 --- a/src/stores/BreadcrumbsStore.ts +++ b/src/stores/BreadcrumbsStore.ts @@ -55,7 +55,7 @@ export class BreadcrumbsStore extends AsyncStoreWithClient { } private get meetsRoomRequirement(): boolean { - return this.matrixClient.getVisibleRooms().length >= 20; + return this.matrixClient && this.matrixClient.getVisibleRooms().length >= 20; } protected async onAction(payload: ActionPayload) {