diff --git a/src/components/structures/RoomDirectory.js b/src/components/structures/RoomDirectory.js index 42dbc1b4e4..dd089a9776 100644 --- a/src/components/structures/RoomDirectory.js +++ b/src/components/structures/RoomDirectory.js @@ -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; });