Skip to content

Commit

Permalink
Merge pull request #393 from systemli/fix-last-message-condition
Browse files Browse the repository at this point in the history
🐛 Fix check for empty message response
  • Loading branch information
0x46616c6b authored Sep 23, 2022
2 parents a5dcf8c + 1da7335 commit 522faf8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/MessageList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const MessageList: FC<Props> = props => {
if (oldestMessage !== undefined) {
getTimeline({ before: oldestMessage.id })
.then(response => {
if (response.data.messages !== null) {
if (response.data.messages.length !== 0) {
setMessages([...messages, ...response.data.messages])
} else {
setLastMessageReceived(true)
Expand Down

0 comments on commit 522faf8

Please sign in to comment.