🐛 fix(parameterComponent): remove unnecessary line break to improve code readability

🐛 fix(utils.ts): set 'type' property to an empty string instead of undefined to avoid potential issues
This commit is contained in:
Cristhian Zanforlin Lousa 2023-07-05 06:52:01 -03:00
commit b8e76b0be4
2 changed files with 3 additions and 2 deletions

View file

@ -101,6 +101,7 @@ export default function ParameterComponent({
refHtml.current = groupedObj.map((item, i) => {
const Icon: any = nodeIconsLucide[item.family];
return (
<span
key={getRandomKeyByssmm() + item.family + i}
@ -127,7 +128,7 @@ export default function ParameterComponent({
{nodeNames[item.family] ?? ""}{" "}
<span className="text-xs">
{" "}
-&nbsp;
{item.type == "" ? '' : ' - '}
{item.type.split(", ").length > 2
? item.type.split(", ").map((el, i) => (
<React.Fragment key={el + i}>

View file

@ -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(', ');