Skip to content

Commit

Permalink
Check if there are labels before sorting (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
rbnmulder authored Feb 5, 2022
1 parent 85fe0dc commit 92014fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion resources/views/category.blade.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<div class="absolute z-10" :style="label.cat_style" v-for="label in Object.values(item.amasty_label).sort((a, b) => a.priority - b.priority).filter((label, index) => !(label.is_single && index))">
<div class="absolute z-10" :style="label.cat_style" v-for="label in Object.values(item.amasty_label ? item.amasty_label : {}).sort((a, b) => a.priority - b.priority).filter((label, index) => !(label.is_single && index))">
@{{ label.cat_txt }}
</div>

0 comments on commit 92014fb

Please sign in to comment.