You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-07 10:46:24 +03:00
Don't crash immediately if the room directory chunk is null/empty
Fixes https://github.com/vector-im/riot-web/issues/12197
This commit is contained in:
@@ -155,7 +155,7 @@ export default createReactClass({
|
||||
|
||||
this.nextBatch = data.next_batch;
|
||||
this.setState((s) => {
|
||||
s.publicRooms.push(...data.chunk);
|
||||
s.publicRooms.push(...(data.chunk || []));
|
||||
s.loading = false;
|
||||
return s;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user