Skip to content

Commit ea10cbd

Browse files
committed
(fix) go back to rooms list if room doesn't exist
1 parent ac92263 commit ea10cbd

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/ChatWindow/ChatWindow.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,12 @@ export default {
125125
rooms: {
126126
immediate: true,
127127
handler(newVal, oldVal) {
128-
if (!newVal[0]) return (this.showRoomsList = true)
128+
if (
129+
!newVal[0] ||
130+
!newVal.find(room => room.roomId === this.room.roomId)
131+
) {
132+
this.showRoomsList = true
133+
}
129134
130135
if (newVal[0] && (!oldVal || newVal.length !== oldVal.length)) {
131136
if (this.roomId) {

0 commit comments

Comments
 (0)