diff --git a/packages/agreement-lifecycle/src/validator/attributesValidator.ts b/packages/agreement-lifecycle/src/validator/attributesValidator.ts index 6031a3a9b4..3f86825ad4 100644 --- a/packages/agreement-lifecycle/src/validator/attributesValidator.ts +++ b/packages/agreement-lifecycle/src/validator/attributesValidator.ts @@ -20,12 +20,14 @@ const attributesSatisfied = ( descriptorAttributes: EServiceAttribute[][], consumerAttributeIds: Array ): boolean => - descriptorAttributes.every((attributeList) => { - const attributes = attributeList.map((a) => a.id); - return ( - attributes.filter((a) => consumerAttributeIds.includes(a)).length > 0 - ); - }); + descriptorAttributes + .filter((attGroup) => attGroup.length > 0) + .every((attributeList) => { + const attributes = attributeList.map((a) => a.id); + return ( + attributes.filter((a) => consumerAttributeIds.includes(a)).length > 0 + ); + }); export const certifiedAttributesSatisfied = ( descriptor: DescriptorWithOnlyAttributes,