From efa5ada463ea60cb450487da79fb7e7663526e94 Mon Sep 17 00:00:00 2001 From: guerler Date: Tue, 17 Sep 2024 18:34:57 +0300 Subject: [PATCH] Return null instead of empty string in unique label validator --- .../Workflow/Editor/composables/useUniqueLabelError.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/client/src/components/Workflow/Editor/composables/useUniqueLabelError.ts b/client/src/components/Workflow/Editor/composables/useUniqueLabelError.ts index 331c1a70b7dc..84276f2998ae 100644 --- a/client/src/components/Workflow/Editor/composables/useUniqueLabelError.ts +++ b/client/src/components/Workflow/Editor/composables/useUniqueLabelError.ts @@ -6,11 +6,9 @@ export function useUniqueLabelError( workflowStateStore: ReturnType, label: string | null | undefined ) { - const error = ref(""); + const error = ref(null); if (label && workflowStateStore.workflowOutputs[label]) { error.value = `Duplicate label ${label}. Please fix this before saving the workflow.`; - } else { - error.value = ""; } return error; }