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 authored and mvdbeek committed Sep 18, 2024
1 parent 07fa2e3 commit efa5ada
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 efa5ada

Please sign in to comment.