Skip to content

Commit

Permalink
fixup! fix(frontend): Make frontend compatible with absence of lastMe…
Browse files Browse the repository at this point in the history
…ssage
  • Loading branch information
DorraJaouad committed Nov 28, 2024
1 parent bbcf97d commit 03c2c01
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/composables/useConversationInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export function useConversationInfo({
})

const hasLastMessage = computed(() => {
return !!item.value?.lastMessage && !!Object.keys(Object(item.value?.lastMessage)).length
return item.value?.lastMessage
})

/**
Expand Down
2 changes: 1 addition & 1 deletion src/store/messagesStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ const getters = {
return false
}

return getters.getLastKnownMessageId(token) < conversation.lastMessage.id
return getters.getLastKnownMessageId(token) < conversation.lastMessage?.id
},

isMessagesListPopulated: (state) => (token) => {
Expand Down

0 comments on commit 03c2c01

Please sign in to comment.