Skip to content

Commit

Permalink
fix: remove duplicate
Browse files Browse the repository at this point in the history
  • Loading branch information
sohnj877 committed Feb 26, 2024
1 parent bb91546 commit 905c5e1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion theme/partials/components/search-results.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
{% set item_categories = [] %}
{% for item in items %}
{% set category = item.categories[0] %}
{% if category.square_online_id and category.square_online_id not in item_categories %}
{% set categoryExists = item_categories|filter((c) => c.square_online_id == category.square_online_id) %}
{% if category.square_online_id and categoryExists == false %}
{% set item_categories = item_categories|merge([category]) %}
{% endif %}
{% endfor %}
Expand Down

0 comments on commit 905c5e1

Please sign in to comment.