Skip to content

Commit

Permalink
fix: Render item in wishlist properly if ID is a string (vercel#647)
Browse files Browse the repository at this point in the history
  • Loading branch information
acasazza authored Jan 16, 2022
1 parent a6babd9 commit de24bd0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/wishlist/WishlistButton/WishlistButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ const WishlistButton: FC<Props> = ({
const itemInWishlist = data?.items?.find(
// @ts-ignore Wishlist is not always enabled
(item) =>
item.product_id === Number(productId) &&
(item.variant_id as any) === Number(variant.id)
item.product_id === productId &&
item.variant_id === variant.id
)

const handleWishlistChange = async (e: any) => {
Expand Down

0 comments on commit de24bd0

Please sign in to comment.