Skip to content

Commit 52f1ebd

Browse files
committed
(fix) do not trigger roomId watcher if null
1 parent d735213 commit 52f1ebd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ChatWindow/ChatWindow.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export default {
125125
roomId: {
126126
immediate: true,
127127
handler(val) {
128-
if (!this.loadingRooms && this.rooms && this.rooms.length) {
128+
if (val && !this.loadingRooms && this.rooms.length) {
129129
const room = this.rooms.find(r => r.roomId === val)
130130
this.fetchRoom({ room })
131131
}

0 commit comments

Comments
 (0)