Skip to content

Commit 0567562

Browse files
committed
(fix) show room state only if user status exists
1 parent 4d9632a commit 0567562

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/ChatWindow/RoomsList.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@
4141
<div class="name-container">
4242
<div class="title-container">
4343
<div
44+
v-if="userStatus(room)"
4445
class="state-circle"
45-
:class="{ 'state-online': userStatus(room) }"
46+
:class="{ 'state-online': userStatus(room) === 'online' }"
4647
></div>
4748
<div class="room-name">
4849
{{ room.roomName }}
@@ -122,7 +123,7 @@ export default {
122123
123124
const user = room.users.find(u => u._id !== this.currentUserId)
124125
125-
return user.status && user.status.state === 'online'
126+
if (user.status) return user.status.state
126127
}
127128
}
128129
}

0 commit comments

Comments
 (0)