Skip to content

Commit

Permalink
fix: category filter error
Browse files Browse the repository at this point in the history
  • Loading branch information
onamkrverma committed Sep 29, 2023
1 parent 213bfd2 commit ec5edd0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pages/ProductInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ const ProductInfo = ({ id }: Props) => {
(item) => item?.variant.product_id === product.value?.id
);

const categories = product.value?.categories.filter(
const categories = product.value?.categories?.filter(
(cate) => !cate.handle.startsWith("loc:")
);
const locations = product.value?.categories
.filter((cate) => cate.handle.startsWith("loc:"))
?.filter((cate) => cate.handle.startsWith("loc:"))
.sort(
(a, b) =>
new Date(a.created_at).getTime() - new Date(b.created_at).getTime()
Expand Down

0 comments on commit ec5edd0

Please sign in to comment.