Skip to content

Commit ae78a7e

Browse files
author
Kaizen Conroy
committed
fix statistic error
1 parent 23dacaa commit ae78a7e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: public/statistics.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ function parseSuperheroStats(data){
139139
})
140140
for (const [_, value] of Object.entries(statistics)) {
141141
var avg=0;
142-
if ((value[1]+value[0]) > 0){
143-
avg = value[1] / (value[0] + value[1]);
142+
if ((value[1]+value[2]) > 0){
143+
avg = value[1] / (value[2] + value[1]);
144144
// Round to 2 decimal places if necessary.
145145
avg = Math.round((avg + Number.EPSILON) * 100) / 100;
146146
}

0 commit comments

Comments
 (0)