From f6fa9ad002f867f4c29c86eb1036eacbe4608c17 Mon Sep 17 00:00:00 2001 From: Klustre Date: Tue, 18 Jan 2022 16:55:10 +0100 Subject: [PATCH] Fixes unwanted throw in `hasAllAttributes` --- lib/select.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/select.js b/lib/select.js index e034eb4..1077959 100644 --- a/lib/select.js +++ b/lib/select.js @@ -231,7 +231,7 @@ function hasAllAttributes( obj, attributes, not ) { attributeValue = attributes[attribute]; if ( !obj.hasOwnProperty( attribute ) ) { - throw new Error( 'The attribute ' + attribute + ' does not exist on a ' + typeof ( obj ) ); + return false; } var isSame = compare( attributeValue, obj[attribute] );