mirror of
https://github.com/LibreQoE/LibreQoS.git
synced 2025-02-25 18:55:32 -06:00
Fix median sort
This commit is contained in:
parent
61ce1e6b57
commit
9370d09cf6
@ -249,14 +249,14 @@ export class ThroughputBpsDash extends BaseDashlet{
|
||||
// Get the median from upRing
|
||||
let upMedian = 0;
|
||||
if (this.upRing.length > 0) {
|
||||
this.upRing.sort();
|
||||
this.upRing.sort((a, b) => a - b);
|
||||
upMedian = this.upRing[Math.floor(this.upRing.length / 2)];
|
||||
}
|
||||
|
||||
// Get the median from dlRing
|
||||
let dlMedian = 0;
|
||||
if (this.dlRing.length > 0) {
|
||||
this.dlRing.sort();
|
||||
this.dlRing.sort((a, b) => a - b);
|
||||
dlMedian = this.dlRing[Math.floor(this.dlRing.length / 2)];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user