mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 11:01:15 +00:00
fix(editor): Canvas connections show X items total label when multiple run iterations (#19648)
This commit is contained in:
@@ -754,12 +754,18 @@ export function useCanvasMapping({
|
||||
const { type, index } = parseCanvasConnectionHandleString(connection.sourceHandle);
|
||||
const runDataTotal =
|
||||
nodeExecutionRunDataOutputMapById.value[fromNode.id]?.[type]?.[index]?.total ?? 0;
|
||||
const hasMultipleRunDataIterations =
|
||||
(nodeExecutionRunDataOutputMapById.value[fromNode.id]?.[type]?.[index]?.iterations ?? 1) >
|
||||
1;
|
||||
|
||||
return runDataTotal > 0
|
||||
? i18n.baseText('ndv.output.items', {
|
||||
adjustToNumber: runDataTotal,
|
||||
interpolate: { count: String(runDataTotal) },
|
||||
})
|
||||
? i18n.baseText(
|
||||
hasMultipleRunDataIterations ? 'ndv.output.itemsTotal' : 'ndv.output.items',
|
||||
{
|
||||
adjustToNumber: runDataTotal,
|
||||
interpolate: { count: String(runDataTotal) },
|
||||
},
|
||||
)
|
||||
: '';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user