Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Don't crash immediately if the room directory chunk is null/empty
Browse files Browse the repository at this point in the history
  • Loading branch information
turt2live committed Feb 3, 2020
1 parent 9bfed51 commit aa6eabc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/structures/RoomDirectory.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
});
Expand Down

0 comments on commit aa6eabc

Please sign in to comment.