🐛 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);
|
let groupedObj = groupByFamily(myData, tooltipTitle, left, data.type, flow);
|
||||||
|
|
||||||
if (groupedObj?.length === 0 && flow && flow.length > 0) {
|
if (groupedObj?.length === 0 && flow && flow.length > 0) {
|
||||||
|
|
||||||
groupedObj = groupByFamilyCustom(
|
groupedObj = groupByFamilyCustom(
|
||||||
myData,
|
myData,
|
||||||
tooltipTitle,
|
tooltipTitle,
|
||||||
|
|
@ -117,8 +116,6 @@ export default function ParameterComponent({
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (groupedObj) {
|
if (groupedObj) {
|
||||||
refNumberComponents.current = groupedObj[0]?.type?.length;
|
refNumberComponents.current = groupedObj[0]?.type?.length;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -256,8 +256,6 @@ export function groupByFamilyCustom(data, baseClasses, left, type, flow) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const groupedResult = {};
|
const groupedResult = {};
|
||||||
|
|
||||||
arrOfType.forEach((item) => {
|
arrOfType.forEach((item) => {
|
||||||
|
|
@ -271,10 +269,8 @@ export function groupByFamilyCustom(data, baseClasses, left, type, flow) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
const result = Object.values(groupedResult);
|
const result = Object.values(groupedResult);
|
||||||
|
|
||||||
|
|
||||||
if (left === false) {
|
if (left === false) {
|
||||||
let resultFiltered = [];
|
let resultFiltered = [];
|
||||||
flow.forEach((element) => {
|
flow.forEach((element) => {
|
||||||
|
|
@ -287,23 +283,23 @@ export function groupByFamilyCustom(data, baseClasses, left, type, flow) {
|
||||||
resultFiltered.push({
|
resultFiltered.push({
|
||||||
family: "custom_components",
|
family: "custom_components",
|
||||||
type: n,
|
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) => {
|
Object.keys(groupedResult).forEach((el) => {
|
||||||
resultFiltered.push({
|
resultFiltered.push({
|
||||||
family: "custom_components",
|
family: "custom_components",
|
||||||
type: groupedResult[el].type,
|
type: groupedResult[el].type,
|
||||||
component: nodeNames["custom_components"]
|
component: nodeNames["custom_components"],
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return resultFiltered;
|
return resultFiltered;
|
||||||
} else {
|
} else {
|
||||||
return result;
|
return result;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue