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
commit bf9d5b7f01
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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;
}); });