From b8e76b0be46c4c78425a0642b2e5510cdae3f382 Mon Sep 17 00:00:00 2001 From: Cristhian Zanforlin Lousa Date: Wed, 5 Jul 2023 06:52:01 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(parameterComponent):=20remov?= =?UTF-8?q?e=20unnecessary=20line=20break=20to=20improve=20code=20readabil?= =?UTF-8?q?ity=20=F0=9F=90=9B=20fix(utils.ts):=20set=20'type'=20property?= =?UTF-8?q?=20to=20an=20empty=20string=20instead=20of=20undefined=20to=20a?= =?UTF-8?q?void=20potential=20issues?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../GenericNode/components/parameterComponent/index.tsx | 3 ++- src/frontend/src/utils.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx b/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx index 1432c86d4..7adfeb2d1 100644 --- a/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx @@ -101,6 +101,7 @@ export default function ParameterComponent({ refHtml.current = groupedObj.map((item, i) => { const Icon: any = nodeIconsLucide[item.family]; + return ( {" "} - -  + {item.type == "" ? '' : ' - '} {item.type.split(", ").length > 2 ? item.type.split(", ").map((el, i) => ( diff --git a/src/frontend/src/utils.ts b/src/frontend/src/utils.ts index 31d2a6149..b40bfd0b0 100644 --- a/src/frontend/src/utils.ts +++ b/src/frontend/src/utils.ts @@ -890,7 +890,7 @@ export function groupByFamily(data, baseClasses, left, type) { groupedArray.forEach((object, index, self) => { const findObj = arrOfLength.find(x => x.type == object.family); if(object.component.length == findObj.length){ - self[index]['type'] = object.type; + self[index]['type'] = ""; } else{ self[index]['type'] = object.component.join(', ');