diff --git a/src/bin/BinSVGV2.tsx b/src/bin/BinSVGV2.tsx index c3c1a40..f3c3454 100644 --- a/src/bin/BinSVGV2.tsx +++ b/src/bin/BinSVGV2.tsx @@ -507,9 +507,9 @@ export default function BinSVGV2(props: Props) { //if the cables have the same number of nodes if (b.temperatures.length === a.temperatures.length) { //sort by temp only last and any type that has humidity first - if ((avg(a.humidities) === 0 || a.humidities.length === 0) && (avg(b.humidities) !== 0 || b.humidities.length > 0)) { + if ((avg(a.humidities) === 0) && (avg(b.humidities) !== 0)) { return 1; - } else if ((avg(b.humidities) === 0 || b.humidities.length === 0) && (avg(a.humidities) !== 0 || a.humidities.length > 0)) { + } else if ((avg(b.humidities) === 0) && (avg(a.humidities) !== 0)) { return -1; } else {