Skip to content

Commit a747491

Browse files
authored
Update SetList.php
1 parent 843513f commit a747491

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

Block/SetList.php

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -319,16 +319,21 @@ public function getIdentities(): array
319319
{
320320
$identities = [];
321321

322-
$set = $this->getLayer()->getCurrentAttributeSet();
323-
if ($set) {
324-
$identities[] = CustomEntity::CACHE_CUSTOM_ENTITY_SET_TAG . '_' . $set->getAttributeSetId();
322+
$attributeSet = $this->getLayer()->getCurrentAttributeSet();
323+
if ($attributeSet) {
324+
$identities[] = CustomEntity::CACHE_CUSTOM_ENTITY_SET_TAG . '_' . $attributeSet->getAttributeSetId();
325325
}
326326

327327
foreach ($this->_getEntityCollection() as $entity) {
328-
$identities[] = $entity->getIdentities();
328+
$entityIdentities = $entity->getIdentities();
329+
if ($entityIdentities) {
330+
foreach ($entityIdentities as $identity) {
331+
$identities[] = $identity;
332+
}
333+
}
329334
}
330335

331-
return $identities;
336+
return array_unique($identities);
332337
}
333338

334339
/**

0 commit comments

Comments
 (0)