We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e174230 commit 21536b5Copy full SHA for 21536b5
src/ChatWindow/ChatWindow.vue
@@ -201,11 +201,11 @@ export default {
201
202
roomId: {
203
immediate: true,
204
- handler(val) {
205
- if (val && !this.loadingRooms && this.rooms.length) {
206
- const room = this.rooms.find(r => r.roomId === val)
+ handler(newVal, oldVal) {
+ if (newVal && !this.loadingRooms && this.rooms.length) {
+ const room = this.rooms.find(r => r.roomId === newVal)
207
this.fetchRoom({ room })
208
- } else if (!val) {
+ } else if (oldVal && !newVal) {
209
this.room = {}
210
}
211
0 commit comments