Skip to content

Commit

Permalink
Don't consider an attribute with an empty string as absent
Browse files Browse the repository at this point in the history
  • Loading branch information
sunesimonsen committed Feb 27, 2019
1 parent 681eb67 commit 1468f1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1548,7 +1548,7 @@ module.exports = {
) {
score += ids.indexOf(attributeName) === -1 ? 1 : 100;
}
} else if (!attributes[attributeName]) {
} else if (typeof attributes[attributeName] === 'undefined') {
score++;
}
});
Expand Down

0 comments on commit 1468f1f

Please sign in to comment.