We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 08d4ce7 commit 532e7adCopy full SHA for 532e7ad
tabs/categories.md
@@ -20,9 +20,11 @@ title: Categories
20
21
{% for post in posts_of_category %}
22
{% assign second_category = post.categories[1] %}
23
- {% unless sub_categories contains second_category %}
24
- {% assign sub_categories = sub_categories | push: second_category %}
25
- {% endunless %}
+ {% if second_category %}
+ {% unless sub_categories contains second_category %}
+ {% assign sub_categories = sub_categories | push: second_category %}
26
+ {% endunless %}
27
+ {% endif %}
28
{% endfor %}
29
30
{% assign sub_categories = sub_categories | sort %}
0 commit comments