From 979ccf4c51c0e7119e5cc6eece1dc426a6de6ad7 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue, 7 Oct 2025 13:35:16 -0700 Subject: [PATCH] Update workflow-edit-dialog.component.ts --- .../workflow-edit-dialog.component.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.ts b/src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.ts index 66290ab2c..7deb1b895 100644 --- a/src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.ts +++ b/src-ui/src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.ts @@ -780,15 +780,17 @@ export class WorkflowEditDialogComponent canAddCondition(formGroup: FormGroup): boolean { const conditions = this.getConditionsFormArray(formGroup) - const usedTypes = conditions.controls.map( - (control) => control.get('type').value as TriggerConditionType + const usedTypes = new Set( + conditions.controls.map( + (control) => control.get('type').value as TriggerConditionType + ) ) return this.conditionDefinitions.some((definition) => { if (definition.allowMultipleEntries) { return true } - return !usedTypes.includes(definition.id) + return !usedTypes.has(definition.id) }) }