fix: correct run count

This commit is contained in:
Mutasem Aldmour 2024-11-12 12:07:54 +01:00
parent 2fde595611
commit f11fb63273
No known key found for this signature in database
GPG key ID: 3DFA8122BB7FD6B8

View file

@ -513,8 +513,8 @@ const subWorkflowData = computed((): ITaskMetadata | null => {
if (!node.value) {
return null;
}
const metadata = get(workflowRunData.value, [node.value.name, props.runIndex, 'metadata'], null);
return metadata;
return workflowRunData.value?.[node.value.name]?.[props.runIndex]?.metadata ?? null;
});
const hasReleatedExectuion = computed((): boolean => {
@ -990,7 +990,7 @@ function getRunLabel(option: number) {
interpolate: { count: itemsCount },
});
const metadata = get(workflowRunData.value, [node.value.name, props.runIndex, 'metadata'], null);
const metadata = workflowRunData.value?.[node.value.name]?.[option - 1]?.metadata ?? null;
const subexecutions = metadata?.subExecutionsCount
? i18n.baseText('ndv.output.andSubExecutions', {
adjustToNumber: metadata.subExecutionsCount,