Hi!
products[0]
doesn't exist when the array is empty, so the script crashes. You probably meant to write products[0]?.quantity || 0
in productDescription.jsx
!
Marked as helpful
@coder-abdo
Posted
@markuslewin here is my fault, I always use typescript to prevent such a minor mistake like that so I will try your solution, and hopefully works.