Skip to content

Commit

Permalink
Return null instead of empty string in unique label validator
Browse files Browse the repository at this point in the history
  • Loading branch information
guerler committed Sep 17, 2024
1 parent a567944 commit d9f6cae
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@ export function useUniqueLabelError(
workflowStateStore: ReturnType<typeof useWorkflowStepStore>,
label: string | null | undefined
) {
const error = ref("");
const error = ref<string | null>(null);
if (label && workflowStateStore.workflowOutputs[label]) {
error.value = `Duplicate label ${label}. Please fix this before saving the workflow.`;
} else {
error.value = "";
}
return error;
}

0 comments on commit d9f6cae

Please sign in to comment.