From d9f6cae047af29eb549f07d362b6053ab86080ea 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; }