kpfadnis commited on
Commit
275e85f
·
1 Parent(s): 4d12df4

fix (aggregator): Fix sort in median aggregator.

Browse files

Signed-off-by: Kshitij Fadnis <[email protected]>

Files changed (1) hide show
  1. src/utilities/aggregators.ts +1 -1
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 =