From 6b9d7dba6d758389026c6eaa445ad8902512227a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Wed, 11 May 2022 15:00:25 +0200 Subject: [PATCH] Web: extra safety check in Jobs Pinia store function --- web/app/src/stores/jobs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/app/src/stores/jobs.js b/web/app/src/stores/jobs.js index f22c2c64..2267cdc4 100644 --- a/web/app/src/stores/jobs.js +++ b/web/app/src/stores/jobs.js @@ -68,7 +68,7 @@ export const useJobs = defineStore('jobs', { * @returns bool indicating whether there is a selected job with any of the given 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); },