Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszjedrasik committed Jul 9, 2021
1 parent 796de42 commit 8b3b431
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/nuxt-theme-module/theme/pages/Category.vue
Original file line number Diff line number Diff line change
Expand Up @@ -378,13 +378,13 @@ export default {
const activeCategory = computed(() => {
const items = categoryTree.value.items;
if (!items) {
if (!items || !items.length) {
return '';
}
const category = items.find(({ isCurrent, items }) => isCurrent || items.find(({ isCurrent }) => isCurrent));
return category?.label || items[0]?.label;
return category?.label || items[0].label;
});
const selectedFilters = ref({});
Expand Down

0 comments on commit 8b3b431

Please sign in to comment.