Fix null workerId and workerVersionId TS issues in worker configuration components
In components/Process/Workers/Configurations/List.vue
the workerId
and workerVersionId
props are passed to components/Process/Workers/Configurations/Create.vue
. These are required props for the configuration creation component, which is (unless I'm mistaken) only ever used in this Configurations/List component. They are computed like this:
workerId () {
if (this.workerVersion !== null) {
return this.workerVersion.worker.id
} else {
return this.workerRun?.worker_version?.worker?.id
}
},
workerVersionId () {
if (this.workerVersion !== null) {
return this.workerVersion.id
} else {
return this.workerRun?.worker_version?.id
}
},
I think the conditions should be written differently because these can't actually ever be null
: Configurations/List is used in two components and always has either a workerVersion
or a workerRun
set. Probably making the else else if this.workerRun !== null
would work.