diff --git a/frontend/src/stores.js b/frontend/src/stores.js index c171d44..f433b83 100644 --- a/frontend/src/stores.js +++ b/frontend/src/stores.js @@ -176,7 +176,9 @@ class MessageStore extends Store { 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); - if (res.success && res.ok && res.json && res.json.length > 0) { + if (res.success && res.ok && res.json) { + if (res.json.length < 1) + return; if (beforeCommitToStore) beforeCommitToStore(res.json); res.json.reverse();