Skip to content

Commit b472918

Browse files
committed
(fix) room init
1 parent cd7104d commit b472918

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/ChatWindow/Room/Room.vue

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -457,9 +457,12 @@ export default {
457457
this.focusTextarea(true)
458458
}
459459
},
460-
room(newVal, oldVal) {
461-
if (newVal.roomId && newVal.roomId !== oldVal.roomId) {
462-
this.onRoomChanged()
460+
room: {
461+
immediate: true,
462+
handler(newVal, oldVal) {
463+
if (!oldVal || (newVal && newVal.roomId !== oldVal.roomId)) {
464+
this.onRoomChanged()
465+
}
463466
}
464467
},
465468
roomMessage: {

0 commit comments

Comments
 (0)