From 1468f1f690a39a4b98d1d7803d26ca0248c87d2f Mon Sep 17 00:00:00 2001 From: Sune Simonsen Date: Wed, 27 Feb 2019 08:50:52 +0100 Subject: [PATCH] Don't consider an attribute with an empty string as absent --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index b4224b02..b0d115c7 100644 --- a/src/index.js +++ b/src/index.js @@ -1548,7 +1548,7 @@ module.exports = { ) { score += ids.indexOf(attributeName) === -1 ? 1 : 100; } - } else if (!attributes[attributeName]) { + } else if (typeof attributes[attributeName] === 'undefined') { score++; } });