Web: extra safety check in Jobs Pinia store function
This commit is contained in:
parent
d2f5fa5ca7
commit
6b9d7dba6d
@ -68,7 +68,7 @@ export const useJobs = defineStore('jobs', {
|
|||||||
* @returns bool indicating whether there is a selected job with any of the given statuses.
|
* @returns bool indicating whether there is a selected job with any of the given statuses.
|
||||||
*/
|
*/
|
||||||
_anyJobWithStatus(statuses) {
|
_anyJobWithStatus(statuses) {
|
||||||
return !!this.activeJob && statuses.includes(this.activeJob.status);
|
return !!this.activeJob && !!this.activeJob.status && statuses.includes(this.activeJob.status);
|
||||||
// return this.selectedJobs.reduce((foundJob, job) => (foundJob || statuses.includes(job.status)), false);
|
// return this.selectedJobs.reduce((foundJob, job) => (foundJob || statuses.includes(job.status)), false);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user