Skip to content

Commit

Permalink
fix(#677): dropped references doesn't posses any attributes for the s…
Browse files Browse the repository at this point in the history
…ake of indexing
  • Loading branch information
novoj committed Nov 20, 2024
1 parent e036a81 commit b323de3
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ public Optional<AttributeValue> getAttributeValue(@Nonnull AttributeKey attribut
if (!Objects.equals(memoizedKey, attributeKey)) {
this.memoizedKey = attributeKey;
this.memoizedValue = getMemoizedReference()
.filter(Droppable::exists)
.flatMap(it -> it.getAttributeValue(attributeKey))
.filter(Droppable::exists);
}
Expand All @@ -88,6 +89,7 @@ public Optional<AttributeValue> getAttributeValue(@Nonnull AttributeKey attribut
@Override
public Stream<AttributeValue> getAttributeValues() {
return getMemoizedReference()
.filter(Droppable::exists)
.map(ReferenceContract::getAttributeValues)
.stream()
.flatMap(Collection::stream)
Expand All @@ -98,6 +100,7 @@ public Stream<AttributeValue> getAttributeValues() {
@Override
public Stream<AttributeValue> getAttributeValues(@Nonnull Locale locale) {
return getMemoizedReference()
.filter(Droppable::exists)
.map(ReferenceContract::getAttributeValues)
.stream()
.flatMap(Collection::stream)
Expand Down

0 comments on commit b323de3

Please sign in to comment.