mirror of https://github.com/vector-im/riot-web
Don't crash immediately if the room directory chunk is null/empty
Fixes https://github.com/vector-im/riot-web/issues/12197pull/21833/head
parent
9bfed510b1
commit
aa6eabcf57
|
@ -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;
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue