Skip to content

Commit 40b6288

Browse files
committed
(fix) unselect room when room-id is null
1 parent e423c15 commit 40b6288

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

demo/src/ChatContainer.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
:theme="theme"
4141
:styles="styles"
4242
:current-user-id="currentUserId"
43-
:roomId="roomId"
43+
:room-id="roomId"
4444
:rooms="loadedRooms"
4545
:loading-rooms="loadingRooms"
4646
:messages="messages"

src/ChatWindow/ChatWindow.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,8 @@ export default {
175175
if (val && !this.loadingRooms && this.rooms.length) {
176176
const room = this.rooms.find(r => r.roomId === val)
177177
this.fetchRoom({ room })
178+
} else if (!val) {
179+
this.room = {}
178180
}
179181
}
180182
},

0 commit comments

Comments
 (0)