diff --git a/app/views/ThreadMessagesView/index.js b/app/views/ThreadMessagesView/index.js index b8d9f7acfcb40774fa6f0fc3b68d2f1051316550..42e9f4a085bcfb2cab243936fc1688389b6d25f8 100644 --- a/app/views/ThreadMessagesView/index.js +++ b/app/views/ThreadMessagesView/index.js @@ -85,6 +85,12 @@ export default class ThreadMessagesView extends React.Component { // eslint-disable-next-line react/sort-comp init = () => { const [room] = this.rooms; + + // if there's not room at this point, it's better to show nothing + if (!room) { + return; + } + const lastThreadSync = new Date(); if (room.lastThreadSync) { this.sync(room.lastThreadSync);