Skip to content

Commit 04b3d46

Browse files
committed
MAGETWO-91440: Unassigned Attribute Values Render as N/A in Product Comparison block
- removing if that doesn't check the first item
1 parent 3aafe9e commit 04b3d46

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

app/code/Magento/Catalog/Block/Product/Compare/ListCompare.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -221,12 +221,9 @@ public function getProductAttributeValue($product, $attribute)
221221
*/
222222
public function hasAttributeValueForProducts($attribute)
223223
{
224-
$index = 0;
225224
foreach ($this->getItems() as $item) {
226-
if ($index++ != 0) {
227-
if ($item->hasData($attribute->getAttributeCode())) {
228-
return true;
229-
}
225+
if ($item->hasData($attribute->getAttributeCode())) {
226+
return true;
230227
}
231228
}
232229
return false;

0 commit comments

Comments
 (0)