Skip to content

Commit ac92263

Browse files
committed
(fix) go back to rooms list when rooms are empty
1 parent c08028d commit ac92263

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/ChatWindow/ChatWindow.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ export default {
125125
rooms: {
126126
immediate: true,
127127
handler(newVal, oldVal) {
128+
if (!newVal[0]) return (this.showRoomsList = true)
129+
128130
if (newVal[0] && (!oldVal || newVal.length !== oldVal.length)) {
129131
if (this.roomId) {
130132
const room = newVal.find(r => r.roomId === this.roomId)

0 commit comments

Comments
 (0)