File tree 4 files changed +37
-12
lines changed
src/dispatch/static/dispatch/src
4 files changed +37
-12
lines changed Original file line number Diff line number Diff line change @@ -143,9 +143,15 @@ export default {
143
143
project: {
144
144
handler (newProject ) {
145
145
if (newProject? .id !== this .lastProjectId ) {
146
- this .lastProjectId = newProject? .id
147
- this .resetSelection ()
148
- this .fetchData ()
146
+ // Check if we're moving to a valid project (not null)
147
+ if (this .lastProjectId ) {
148
+ this .lastProjectId = newProject .id
149
+ this .resetSelection ()
150
+ this .fetchData ()
151
+ } else {
152
+ // If new project is null/undefined, just update lastProjectId
153
+ this .lastProjectId = null
154
+ }
149
155
}
150
156
this .validatePriority ()
151
157
},
Original file line number Diff line number Diff line change @@ -172,9 +172,15 @@ export default {
172
172
project: {
173
173
handler (newProject ) {
174
174
if (newProject? .id !== this .lastProjectId ) {
175
- this .lastProjectId = newProject? .id
176
- this .resetSelection ()
177
- this .fetchData ()
175
+ // Check if we're moving to a valid project (not null)
176
+ if (this .lastProjectId ) {
177
+ this .lastProjectId = newProject .id
178
+ this .resetSelection ()
179
+ this .fetchData ()
180
+ } else {
181
+ // If new project is null/undefined, just update lastProjectId
182
+ this .lastProjectId = null
183
+ }
178
184
}
179
185
this .validateType ()
180
186
},
Original file line number Diff line number Diff line change @@ -133,10 +133,17 @@ export default {
133
133
project: {
134
134
handler (newProject ) {
135
135
if (newProject? .id !== this .lastProjectId ) {
136
- this .lastProjectId = newProject? .id
137
- this .resetSelection ()
138
- this .fetchData ()
136
+ // Check if we're moving to a valid project (not null)
137
+ if (this .lastProjectId ) {
138
+ this .lastProjectId = newProject .id
139
+ this .resetSelection ()
140
+ this .fetchData ()
141
+ } else {
142
+ // If new project is null/undefined, just update lastProjectId
143
+ this .lastProjectId = null
144
+ }
139
145
}
146
+
140
147
this .validatePriority ()
141
148
},
142
149
deep: true ,
Original file line number Diff line number Diff line change @@ -86,9 +86,15 @@ export default {
86
86
project: {
87
87
handler (newProject ) {
88
88
if (newProject? .id !== this .lastProjectId ) {
89
- this .lastProjectId = newProject? .id
90
- this .clearSelection ()
91
- this .fetchData ()
89
+ // Check if we're moving to a valid project (not null)
90
+ if (this .lastProjectId ) {
91
+ this .lastProjectId = newProject .id
92
+ this .resetSelection ()
93
+ this .fetchData ()
94
+ } else {
95
+ // If new project is null/undefined, just update lastProjectId
96
+ this .lastProjectId = null
97
+ }
92
98
}
93
99
},
94
100
},
You can’t perform that action at this time.
0 commit comments