fix: Flip templateFilter to match Array.filter
Signed-off-by: Jack Palmer <jackpalmer@spotify.com>
This commit is contained in:
@@ -214,7 +214,7 @@ describe('TemplateGroups', () => {
|
||||
|
||||
expect(TemplateGroup).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
templates: [expect.objectContaining({ template: mockEntities[1] })],
|
||||
templates: [expect.objectContaining({ template: mockEntities[0] })],
|
||||
}),
|
||||
{},
|
||||
);
|
||||
|
||||
@@ -91,7 +91,7 @@ export const TemplateGroups = (props: TemplateGroupsProps) => {
|
||||
{groups.map(({ title, filter }, index) => {
|
||||
const templates = entities
|
||||
.filter(isTemplateEntityV1beta3)
|
||||
.filter(e => (templateFilter ? !templateFilter(e) : true))
|
||||
.filter(e => (templateFilter ? templateFilter(e) : true))
|
||||
.filter(filter)
|
||||
.map(template => {
|
||||
const additionalLinks =
|
||||
|
||||
Reference in New Issue
Block a user