Skip to content

Commit

Permalink
Make access safer
Browse files Browse the repository at this point in the history
  • Loading branch information
klzns committed Apr 15, 2021
1 parent dc3ba2c commit a634ab1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions react/Index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@ function SimilarProductsVariants({
<a
key={element.productId}
className={`${handles.img_wrap}${
route.params.slug === element.linkText ? '--is-active' : ''
route?.params?.slug === element.linkText ? '--is-active' : ''
}`}
href={`/${element.linkText}/p`}
>
<img
height="50px"
alt={element.productName}
className={`${handles.img} mr3 ${
route.params.slug === element.linkText ? 'o-50' : ''
route?.params?.slug === element.linkText ? 'o-50' : ''
}`}
src={element.items[0].images[0].imageUrl}
/>
Expand Down

0 comments on commit a634ab1

Please sign in to comment.