|
|
@@ -54,10 +54,9 @@ export class AdjusterService {
|
|
|
max = a.aggregate;
|
|
|
}
|
|
|
});*/
|
|
|
- const max = Math.max(
|
|
|
- ...attractivenessData.map((a) => a.aggregate),
|
|
|
- 0
|
|
|
- );
|
|
|
+ const max = attractivenessData.reduce((a, b) =>
|
|
|
+ a.aggregate > b.aggregate ? a : b
|
|
|
+ ).aggregate;
|
|
|
const normalizer = 1 / max;
|
|
|
attractivenessData.forEach((a) => {
|
|
|
a.aggregate *= normalizer;
|