diff --git a/package.json b/package.json index 77f319c..b48ad71 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "thatconference.com", - "version": "5.0.6", + "version": "5.0.7", "description": "THATConference.com website", "main": "index.js", "type": "module", diff --git a/src/_components/activities/List.svelte b/src/_components/activities/List.svelte index 7cb890b..c9f7333 100644 --- a/src/_components/activities/List.svelte +++ b/src/_components/activities/List.svelte @@ -61,7 +61,9 @@ const tagsSet = new Set(); const communitiesSet = new Set(); - for (const activity of activities) { + for (let j = 0; j < activities.length; j += 1) { + const activity = activities[j]; + for (const tag of activity.tags) { tagsSet.add(tag.toLowerCase()); } @@ -87,23 +89,27 @@ $: primaryCategorySort = activitiesFiltered.filter( (activity) => - (activity.category == 'FAMILY' ? family : false) || - (activity.category == 'PROFESSIONAL' ? professional : false) || - activities.category == null + (activity.category === 'FAMILY' ? family : false) || + (activity.category === 'PROFESSIONAL' ? professional : false) || + activities.category === null ); $: activitiesLocationCategoryFiltered = primaryCategorySort.filter( (activity) => - (activity.type == 'REGULAR' ? regular : false) || - (activity.type == 'KEYNOTE' ? keynote : false) || - (activity.type == 'WORKSHOP' ? workshop : false) || - (activity.type == 'OPEN_SPACE' ? openSpace : false) + (activity.type === 'REGULAR' ? regular : false) || + (activity.type === 'KEYNOTE' ? keynote : false) || + (activity.type === 'WORKSHOP' ? workshop : false) || + (activity.type === 'OPEN_SPACE' ? openSpace : false) ); $: activitiesTaggedFiltered = selectedFilterTerms.length > 0 - ? activitiesLocationCategoryFiltered.filter((activity) => - selectedFilterTerms.some((tag) => activity.tags.some((t) => t.toLowerCase() === tag)) + ? activitiesLocationCategoryFiltered.filter( + (activity) => + selectedFilterTerms.some((tag) => activity.tags.some((t) => t.toLowerCase() === tag)) || + selectedFilterTerms.some((tag) => + activity.communities.some((c) => c.toLowerCase() === tag.replace('@', '')) + ) ) : activitiesLocationCategoryFiltered;