Skip to content

Commit 3996a20

Browse files
committed
(chore) add deep option to watch arrays
1 parent 6712292 commit 3996a20

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/lib/ChatWindow.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ export default {
201201
watch: {
202202
rooms: {
203203
immediate: true,
204+
deep: true,
204205
handler(newVal, oldVal) {
205206
if (
206207
!newVal[0] ||

src/lib/Message/Message.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,7 @@ export default {
318318
watch: {
319319
newMessages: {
320320
immediate: true,
321+
deep: true,
321322
handler(val) {
322323
if (!val.length || !this.showNewMessagesDivider) {
323324
return (this.newMessage = {})

0 commit comments

Comments
 (0)