Skip to content

Commit

Permalink
feat(ui-tags): handle case-insensitive tags in filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
laurent-laporte-pro committed Feb 16, 2024
1 parent 51cb4ac commit e01c8de
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion webapp/src/utils/studiesUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ const tagsPredicate = R.curry(
if (!study.tags || study.tags.length === 0) {
return false;
}
return R.intersection(study.tags, tags).length > 0;
const upperCaseTags = tags.map((tag) => tag.toUpperCase());
const upperCaseStudyTags = study.tags.map((tag) => tag.toUpperCase());
return R.intersection(upperCaseStudyTags, upperCaseTags).length > 0;
},
);

Expand Down

0 comments on commit e01c8de

Please sign in to comment.