Skip to content

Commit

Permalink
fix: regression from pr#1451 broken track filters
Browse files Browse the repository at this point in the history
fix: community filter
  • Loading branch information
brettski committed Oct 6, 2023
1 parent 4290c00 commit 8073e61
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "that-us",
"version": "3.13.7",
"version": "3.13.8",
"description": "THAT.us website",
"main": "index.js",
"type": "module",
Expand Down
22 changes: 13 additions & 9 deletions src/_components/activities/List.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -87,23 +87,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;
Expand Down

0 comments on commit 8073e61

Please sign in to comment.