1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-17 17:42:41 +03:00

Merge pull request #4027 from matrix-org/travis/fix-room-list

Don't crash immediately if the room directory chunk is null/empty
This commit is contained in:
Travis Ralston
2020-02-04 09:36:12 +00:00
committed by GitHub

View File

@@ -155,7 +155,7 @@ export default createReactClass({
this.nextBatch = data.next_batch; this.nextBatch = data.next_batch;
this.setState((s) => { this.setState((s) => {
s.publicRooms.push(...data.chunk); s.publicRooms.push(...(data.chunk || []));
s.loading = false; s.loading = false;
return s; return s;
}); });