Appease the tests

pull/21833/head
Travis Ralston 2020-06-08 18:26:43 -06:00
parent eff97e6c20
commit 5083811deb
1 changed files with 3 additions and 1 deletions

View File

@ -68,7 +68,9 @@ export class BreadcrumbsStore extends AsyncStoreWithClient<IState> {
// waiting for a room join to complete.
this.waitingRooms.push({roomId: payload.room_id, addedTs: Date.now()});
} else {
await this.appendRoom(this.matrixClient.getRoom(payload.room_id));
// The tests might not result in a valid room object.
const room = this.matrixClient.getRoom(payload.room_id);
if (room) await this.appendRoom(room);
}
}
}