Skip to content

Commit

Permalink
fix: changed filter method to remove content on truthy result content on
Browse files Browse the repository at this point in the history
  • Loading branch information
AEmberson committed Oct 14, 2024
1 parent b66c497 commit 5b2a66f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/lib/ContentClient.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ describe('ContentClient', () => {
rootId: ROOT.content._meta.deliveryId,
},
(contentBody) => {
return contentBody['propertyName1'] === 'B';
return contentBody['propertyName1'] === 'C';
}
);
expect(response).to.deep.eq(expectedContent);
Expand Down Expand Up @@ -633,7 +633,7 @@ describe('ContentClient', () => {
rootId: ROOT.content._meta.deliveryId,
},
(contentBody) => {
return contentBody['propertyName1'] === 'B';
return contentBody['propertyName1'] === 'C';
},
(contentBody) => {
contentBody['mutatedId'] = contentBody._meta.deliveryId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export class FilteringAndMutatingHierarchyAssembler<Body extends ContentBody>
.filter((contentItem) => {
return (
isParent(rootItem.content, contentItem.content) &&
!this.filterFunction(contentItem.content)
this.filterFunction(contentItem.content)
);
})
.map((item) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export class FilteringHierachyAssemblerImpl<Body extends ContentBody>
.filter((contentItem) => {
return (
isParent(rootItem.content, contentItem.content) &&
!this.filterFunction(contentItem.content)
this.filterFunction(contentItem.content)
);
})
.map((item) => {
Expand Down

0 comments on commit 5b2a66f

Please sign in to comment.