Cart icon glitching?

Topic summary

A custom cart icon SVG is reverting to Shopify’s default basket icon under specific conditions:

Issue behavior:

  • Custom icon displays correctly initially
  • After adding or removing items from cart, then clicking away, the icon reverts to the default Shopify basket
  • Problem occurs on product pages

Visual evidence:

  • User provided three screenshots showing the icon transformation
  • Normal state shows custom SVG
  • After cart interaction and clicking off, default basket appears

Status: Issue remains unresolved with no responses yet. The user is seeking a fix for this cart icon persistence problem, which appears to be a theme customization or JavaScript state management issue.

Summarized with AI on November 6. AI used: claude-sonnet-4-5-20250929.

Can anyone help me please. My cart icon svg reverts back to the original shopify basket when I put something in my cart and then click off it or if I remove something from my cart and then click off it.

url: https://errival.com/products/errival-pump-shotgun

Normal:

Screenshot 2024-08-22 at 19.42.24.png

Then add/remove something to cart then click off:

Changes to this:

Any fix for this would be very appreciated!