diff --git a/frontend/src/stores.js b/frontend/src/stores.js index aba5fc4..d47f378 100644 --- a/frontend/src/stores.js +++ b/frontend/src/stores.js @@ -224,6 +224,9 @@ class MessageStore extends Store { } async loadOlderMessages(beforeCommitToStore=null) { + if (this.channelId === -1) + return; + const oldestMessage = this.value[0]; const endpoint = oldestMessage ? `channels/${this.channelId}/messages/?before=${oldestMessage.id}` : `channels/${this.channelId}/messages`; const res = await request("GET", apiRoute(endpoint), true, null);