We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 453bacc commit a4af5efCopy full SHA for a4af5ef
src/ChatWindow/Message/Message.vue
@@ -286,14 +286,17 @@ export default {
286
},
287
288
watch: {
289
- newMessages(val) {
290
- if (!val.length || !this.showNewMessagesDivider) {
291
- return (this.newMessage = {})
+ newMessages: {
+ immediate: true,
+ handler(val) {
292
+ if (!val.length || !this.showNewMessagesDivider) {
293
+ return (this.newMessage = {})
294
+ }
295
+
296
+ this.newMessage = val.reduce((res, obj) =>
297
+ obj.index < res.index ? obj : res
298
+ )
299
}
-
- this.newMessage = val.reduce((res, obj) =>
- obj.index < res.index ? obj : res
- )
300
301
302
0 commit comments