Skip to content

Commit

Permalink
remove hack
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish committed Mar 9, 2018
1 parent 713db61 commit bb099d3
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions lighthouse-core/scoring.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,7 @@ class ReportScoring {
static arithmeticMean(items) {
const results = items.reduce(
(result, item) => {
// HACK. remove this in the next PR
// Srsly. The score inconsitency has been very bad.
let itemScore = item.score;
if (typeof item.score === 'boolean') {
itemScore = item.score ? 100 : 0;
}

const score = Number(itemScore) || 0;
const score = Number(item.score) || 0;
const weight = Number(item.weight) || 0;
return {
weight: result.weight + weight,
Expand Down

0 comments on commit bb099d3

Please sign in to comment.