File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -127,20 +127,18 @@ export default {
127
127
rooms: {
128
128
immediate: true ,
129
129
handler (newVal , oldVal ) {
130
- if (! this .loadFirstRoom ) {
131
- this .room = {}
132
- this .showRoomsList = true
133
- return
134
- }
135
-
136
130
if (
137
131
! newVal[0 ] ||
138
132
! newVal .find (room => room .roomId === this .room .roomId )
139
133
) {
140
134
this .showRoomsList = true
141
135
}
142
136
143
- if (newVal[0 ] && (! oldVal || newVal .length !== oldVal .length )) {
137
+ if (
138
+ this .loadFirstRoom &&
139
+ newVal[0 ] &&
140
+ (! oldVal || newVal .length !== oldVal .length )
141
+ ) {
144
142
if (this .roomId ) {
145
143
const room = newVal .find (r => r .roomId === this .roomId )
146
144
this .fetchRoom ({ room })
@@ -153,6 +151,10 @@ export default {
153
151
}
154
152
},
155
153
154
+ loadingRooms (val ) {
155
+ if (val) this .room = {}
156
+ },
157
+
156
158
roomId: {
157
159
immediate: true ,
158
160
handler (val ) {
You can’t perform that action at this time.
0 commit comments