Skip to content

Commit

Permalink
Merge pull request #18 from AOEpeople/bugfix/respect-different-masks
Browse files Browse the repository at this point in the history
Check not only for hash event for mask too.
  • Loading branch information
hacksch authored Oct 30, 2023
2 parents 2cb9525 + 084f327 commit 4352f70
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Classes/Domain/Model/Asset/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ public function __construct()
public function append($asset)
{
$elementHash = $asset->getHash();
if (in_array($elementHash, $this->elementHashes)) {
$found = array_search($elementHash, $this->elementHashes);

// Check if hash exists and if mask is equal
if (false !== $found && $asset->getMask() === $this[$found]->getMask()) {
return;
}
$this->elementHashes[] = $elementHash;
Expand Down

0 comments on commit 4352f70

Please sign in to comment.