From c81a156fcdc7abc5a8a96789d77126c1be6ece41 Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Mon, 16 Oct 2023 12:44:35 -0300 Subject: [PATCH] fix bug for capital case errors --- src/frontend/src/utils/reactflowUtils.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/frontend/src/utils/reactflowUtils.ts b/src/frontend/src/utils/reactflowUtils.ts index 5cb549471..cb2f8962b 100644 --- a/src/frontend/src/utils/reactflowUtils.ts +++ b/src/frontend/src/utils/reactflowUtils.ts @@ -13,7 +13,7 @@ import { cleanEdgesType, unselectAllNodesType, } from "../types/utils/reactflowUtils"; -import { toNormalCase } from "./utils"; +import { toTitleCase } from "./utils"; export function cleanEdges({ flow: { edges, nodes }, @@ -216,7 +216,9 @@ export function validateNode(node: NodeType, edges: Edge[]): Array { ) { errors.push( `${type} is missing ${ - template.display_name || toNormalCase(template[t].name) + template[t].display_name || + toTitleCase(template[t].name) || + toTitleCase(t) }.` ); } else if (