Spaces:
Running
Running
fix (aggregator): Fix sort in median aggregator.
Browse filesSigned-off-by: Kshitij Fadnis <[email protected]>
src/utilities/aggregators.ts
CHANGED
@@ -77,7 +77,7 @@ export const medianAggregator: Aggregator = {
|
|
77 |
);
|
78 |
|
79 |
// Step 2: Sort the numeric scores
|
80 |
-
const sortedNumericScores = numericScores.toSorted();
|
81 |
|
82 |
// Step 3: Calculate aggregate value & standard deviation
|
83 |
const median =
|
|
|
77 |
);
|
78 |
|
79 |
// Step 2: Sort the numeric scores
|
80 |
+
const sortedNumericScores = numericScores.toSorted((a, b) => a - b);
|
81 |
|
82 |
// Step 3: Calculate aggregate value & standard deviation
|
83 |
const median =
|