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 {
127127 rooms: {
128128 immediate: true ,
129129 handler (newVal , oldVal ) {
130- if (! this .loadFirstRoom ) {
131- this .room = {}
132- this .showRoomsList = true
133- return
134- }
135-
136130 if (
137131 ! newVal[0 ] ||
138132 ! newVal .find (room => room .roomId === this .room .roomId )
139133 ) {
140134 this .showRoomsList = true
141135 }
142136
143- if (newVal[0 ] && (! oldVal || newVal .length !== oldVal .length )) {
137+ if (
138+ this .loadFirstRoom &&
139+ newVal[0 ] &&
140+ (! oldVal || newVal .length !== oldVal .length )
141+ ) {
144142 if (this .roomId ) {
145143 const room = newVal .find (r => r .roomId === this .roomId )
146144 this .fetchRoom ({ room })
@@ -153,6 +151,10 @@ export default {
153151 }
154152 },
155153
154+ loadingRooms (val ) {
155+ if (val) this .room = {}
156+ },
157+
156158 roomId: {
157159 immediate: true ,
158160 handler (val ) {
You can’t perform that action at this time.
0 commit comments