Skip to content

Commit

Permalink
fixup! Fix(MessagesList): skip soft update when needed and make editi…
Browse files Browse the repository at this point in the history
…ng a message softer
  • Loading branch information
DorraJaouad committed Feb 21, 2024
1 parent fb4c381 commit f181734
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/MessagesList/MessagesList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ export default {
handler(newMessages, oldMessages) {
const newGroups = this.prepareMessagesGroups(newMessages)
// Check if messages token has changed or if messages were just loaded
if (!!oldMessages || (newMessages.length && newMessages[0].token !== oldMessages?.at(0).token)) {
if (!oldMessages || (newMessages.length && newMessages[0].token !== oldMessages?.at(0)?.token)) {
this.messagesGroupedByDateByAuthor = newGroups
} else {
this.softUpdateByDateGroups(this.messagesGroupedByDateByAuthor, newGroups)
Expand Down

0 comments on commit f181734

Please sign in to comment.