Skip to content

Commit

Permalink
fix: skip empty tags in discovery page (#1118)
Browse files Browse the repository at this point in the history
* fix: skip empty tags in discovery page

* fix: shorten checks for empty tags
  • Loading branch information
george42-ctds authored Oct 13, 2022
1 parent 267f721 commit 12a77a6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Discovery/aggMDSUtils.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ const retrieveCommonsInfo = async (commonsName) => {
* @param {*} tags
* @returns array with duplicates removed
*/
const getUniqueTags = ((tags) => tags.filter((v, i, a) => a.findIndex((t) => (t.category === v.category && t.name === v.name)) === i));
const getUniqueTags = ((tags) => tags.filter((v, i, a) => a.findIndex((t) => (
t.name?.length > 0 && t.category === v.category && t.name === v.name)) === i));

const loadStudiesFromAggMDSRequests = async (offset, limit) => {
const url = `${aggMDSDataURL}?data=True&limit=${limit}&offset=${offset}`;
Expand Down

0 comments on commit 12a77a6

Please sign in to comment.