🐛 fix(parameterComponent): remove unnecessary empty lines for better code readability
🐛 fix(utils): remove unnecessary empty lines for better code readability
This commit is contained in:
parent
12933ccf52
commit
f64d0a2ae4
2 changed files with 6 additions and 13 deletions
|
|
@ -107,7 +107,6 @@ export default function ParameterComponent({
|
|||
let groupedObj = groupByFamily(myData, tooltipTitle, left, data.type, flow);
|
||||
|
||||
if (groupedObj?.length === 0 && flow && flow.length > 0) {
|
||||
|
||||
groupedObj = groupByFamilyCustom(
|
||||
myData,
|
||||
tooltipTitle,
|
||||
|
|
@ -117,8 +116,6 @@ export default function ParameterComponent({
|
|||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (groupedObj) {
|
||||
refNumberComponents.current = groupedObj[0]?.type?.length;
|
||||
|
||||
|
|
|
|||
|
|
@ -256,8 +256,6 @@ export function groupByFamilyCustom(data, baseClasses, left, type, flow) {
|
|||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
const groupedResult = {};
|
||||
|
||||
arrOfType.forEach((item) => {
|
||||
|
|
@ -271,10 +269,8 @@ export function groupByFamilyCustom(data, baseClasses, left, type, flow) {
|
|||
}
|
||||
});
|
||||
|
||||
|
||||
const result = Object.values(groupedResult);
|
||||
|
||||
|
||||
if (left === false) {
|
||||
let resultFiltered = [];
|
||||
flow.forEach((element) => {
|
||||
|
|
@ -287,23 +283,23 @@ export function groupByFamilyCustom(data, baseClasses, left, type, flow) {
|
|||
resultFiltered.push({
|
||||
family: "custom_components",
|
||||
type: n,
|
||||
component: element["data"]["node"]["display_name"]
|
||||
component: element["data"]["node"]["display_name"],
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
if(resultFiltered.length === 0) {
|
||||
if (resultFiltered.length === 0) {
|
||||
Object.keys(groupedResult).forEach((el) => {
|
||||
resultFiltered.push({
|
||||
family: "custom_components",
|
||||
type: groupedResult[el].type,
|
||||
component: nodeNames["custom_components"]
|
||||
})
|
||||
})
|
||||
component: nodeNames["custom_components"],
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
return resultFiltered;
|
||||
} else {
|
||||
return result;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue